31
General / Theory behind a simple GUI
« on: August 01, 2011, 01:53:40 pm »Quote from: "Nexus"
If you declare the destructor, you usually also have to declare copy constructor and copy assignment operator (Rule of the Big Three). But I don't think in your example there is a need for a manually-defined destructor, so just omit it.
Heh, thanks for pointing that out! After reading that rule, I realized that my current project is full of errors, and I just mindlessly use raw pointers, new and delete, in constructors and destructors respectively, without declaring copy constructors and assignment operators, and I thought I'm doing the right thing. It's about time I start fixing them