Introduction to Programming
Question #64
Read the question, compare the options, and review the correct answer below.
CS201 · Final-term only#64
What is the sequence of event(s) when deallocating memory using delete operator?
- A
Only block of memory is deallocated for objects
- B
Only destructor is called for objects
- C
Memory is de-allocated first before calling destructor
- D
Destructor is called first before de-allocating memory
Show correct answer
Correct answer: D. Destructor is called first before de-allocating memory
Check community answers against your course notes.