Destructor only used in static memory allocation, which is on the stack. When the object is out of the scope, the compiler will call destructor to release this object.
You should manually release dynamical memory allocation in destructor; destructor itself by default can do nothing for this.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment