A:\minispir.GIFA:\minispir.GIF
‹#›
22
Destructors
•The purpose of a destructor is to deallocate all dynamic memory and close down any resources being used
•For the statically allocated array, the destructor had no purpose
•For the dynamically allocated array, it would be: delete [] d_array;
•Question: Do we need to set the other data members to zero? And, d_array to zero?