function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nilesh Borse 9Nilesh Borse 9 

How heap allocates in salesforce

Hi,

When i through my debug log, i can see the different heap allocates for the same type of varibales, it might be because of the data variables holds but i would like to know in detail how heap allocation works and the heap allocation for different type of variables.

Prashant Pandey07Prashant Pandey07
Hi Nilesh,

The reason could be your record that you are viewing and those variable holding different amount of memory at runtime.
Check this post that may help you..
http://www.laceysnr.com/break-the-rules-to-avoid-breaking-the-limits/

https://www.sundoginteractive.com/blog/system.limitexception-apex-heap-size-too-large


--
Thanks,
Prashant