Skip to content

Instantly share code, notes, and snippets.

@brianmfear
Created January 8, 2019 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianmfear/30a3115c3074de43a66c3f78b399f00a to your computer and use it in GitHub Desktop.
Save brianmfear/30a3115c3074de43a66c3f78b399f00a to your computer and use it in GitHub Desktop.
Let's Use 51 MB of Heap Without LimitException
string[] s = new string[0];
for(integer i = 0; i < 10100; i++) {
s.add('*'.repeat(i));
}
system.debug(Limits.getHeapSize());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment