Which technique may reduce heap size?

Posted by: Pdfprep Category: PDII Tags: , ,

A developer encounters an error that states that the Apex heap size is exceeded.

Which technique may reduce heap size?
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

Answer: D