Salesforce
PDII · Question #87
A developer encounters an error that states that the Apex heap size is exceeded. Which technique may reduce heap size?
The correct answer is D. Use SOQL for loops instead of standard SOQL queries. See the full explanation below for the reasoning.
Question
A developer encounters an error that states that the Apex heap size is exceeded. Which technique may reduce heap size?
Options
- AAdd the transient keyword to the variable definition
- BMove the variable definition inside the scope of the function
- CUse static variables instead of instance variables
- DUse SOQL for loops instead of standard SOQL queries
How the community answered
(27 responses)- A4% (1)
- B7% (2)
- C11% (3)
- D78% (21)
Community Discussion
No community discussion yet for this question.