I was wondering, is it very useful to put destructors for classes? And what's the purpose of it?
Thanks
I was wondering, is it very useful to put destructors for classes? And what's the purpose of it?
Thanks
Last edited by Ruski; 07-16-2002 at 03:19 AM.
To completely clear up the memory that was allocated for the instance of the class
If you use only auto variables(default) then destructor is not needed. Default constructor is created anyway. But dynamically allocated data should be destroyed.
deconstuructors are called when a onject is destroyed
C++ Makes you Feel Better
"Gravity connot be held reponsible for people falling in love"--Albert Einstein