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.

No comments:

Post a Comment