If you want to avoid hitting heap size limit then you may follow below guidelines 1. Use of Transient variables. 2. you may use Limits.getHeapSize() & Limits.getLimitHeapSize() to check runtime if you are close to limit or not 3. Avoid multile loops and try to keep your optimized.
1. Use of Transient variables.
2. you may use Limits.getHeapSize() & Limits.getLimitHeapSize() to check runtime if you are close to limit or not
3. Avoid multile loops and try to keep your optimized.
Thanks
Sandeep Singhal
http://www.codespokes.com/