How to reduce Apex heap size?



How to reduce Apex heap size?..

Answer / Vivek Narain Singh

To reduce Apex heap size, you can optimize your code by following best practices such as minimizing the number of DML operations, using collections instead of loops, using SOQL efficiently, avoiding unnecessary querying, and limiting recursion. Additionally, you can use methods like `Database.Stateful` or `Database.Batchable` to manage large data sets in a more efficient way.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

What are different user licenses available in salesforce and explain them?

1 Answers  


What are governor limits in salesforce.com?

1 Answers  


Is it possible to create parallel approval process (ability for multiple user to approve or reject a record)? : salesforce workflows and approval process

1 Answers  


What is Time-Dependent Workflow?

1 Answers  


Why do we use @auraenabled annotation?

1 Answers  


Difference between soql vs sosl in salesforce?

1 Answers  


If I want to Insert, Update any record into 'Account'. What trigger I have to use?

1 Answers   American Express,


What are maps in apex?

1 Answers  


What is a role and role hierarchy? : salesforce admin

1 Answers  


what is master-detail relationship?

1 Answers  


Difference between count() and count(fieldname) ?

1 Answers  


What is the relationship in salesforce?

1 Answers  


Categories