Wednesday, September 1, 2010
When are destructors called?
A destructor for an object is called whenever
The scope of a local variable or parameter is exited, the destructor is called.
By explicitly calling the destructor.
Default constructor vs custom constructor
If you don't have anything to clean up, like memory that you allocated for some of the members, then the default constructor is probably ok.
Share to Twitter
Share to Facebook
Share to Pinterest
c++ / cpp
Post a Comment
Post Comments (Atom)