Which technique may reduce the heap size if developer encounters an - ProProfs Discuss
Topics
Products
Follow Us:

Which technique may reduce the heap size if developer encounters an error that states that the Apex heap size is exceeded?



A. Add the transient keyword to the variable definition.
B. Move the variable definition inside the scope of the function.
C. Use static variables instead of instance variables.
D. Use SOQL for loops instead of standard SOQL queries.

This question is part of PD2
Asked by Sumit Jangid, Last updated: Jul 11, 2020

+ Answer
Request

3 Answers

Pal

Pal

Answered Jan 16, 2018

Use SOQL for loops instead of standard SOQL queries.
1
 

J. Harty

Have keen interest in writing, traveller by heart.

J. Harty, Writer, M.A, Chula Vista

Answered Jan 25, 2019

D is the answer to this question. The developer would need to use SOQL instead of the SOQL queries for the loops. The developer is also known as the programmer. This is the person responsible for making sure that all of the software systems as well maintained.

If the software systems are not well maintained, there is a big chance that businesses will not be very efficient. Businesses are expected to provide services that are very much needed by the customers.

If these things would not be done, then the business may not also have the ability to provide what is expected of them which can result in lower sales and lower trust from the customers.

1
 

mS vineesh

MS vineesh

Answered Aug 21, 2018

Add the transient keyword to the variable definition.

Use SOQL for loops instead of standard SOQL queries.

 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.