Which technique may reduce the heap size if developer encounters an - ProProfs Discuss
Advertisement

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: Oct 24, 2020

+ Answer
Request
Question menu
Vote up Vote down

3 Answers

Pal

Pal

Pal
Pal

Answered Jan 16, 2018

Use SOQL for loops instead of standard SOQL queries.
upvote 1 downvote
Reply 

J. Harty

J. Harty

Have keen interest in writing, traveller by heart.

J. Harty
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.

upvote downvote 1
Reply 

mS vineesh

mS vineesh

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.

upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

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