Google News
logo
CPP - Quiz(MCQ)
When we are using heap operations what do we need to do to save the memory?
A)
delete the objects after processing
B)
rename the objects
C)
both rename & delete the objects
D)
add the objects

Correct Answer :   delete the objects after processing


Explanation : When you allocate memory from the heap, you must remember to clean up objects when you’re done! Failure to do so is called a memory leak.

Advertisement