-
destructor (any need)
when creating objects of a class is there any need to include a user defined destructor to destroy them or am I better of with the default one ie. is there any need for a desructor when it just deals with objects.
thanks.
-
&TH of undefined behavior
Well if you have allocated memory on the freestore with new....then where better to call delete on the pointer before you lose scope..
If you dont you will have memory leaks...
If it is a simple class where all variables are on the stack then you could get away with it
Popular pages
Recent additions