technique
Item-7 Declare destructor virtual in polymorphic base classes
· β 3 min read
If a class has any virtual functions (for polymorphic purpose), it should have a virtual destructor.
Item-6 Disallow unwanted compiler-generated functions
· β 2 min read
Declare unwanted member functions private without implementations to disallow functionality automatically provided by compilers.
Item-5 What functions C++ silently generates
· β 3 min read
Compilers may implicitly generate their own versions of default constructor, copy constructor, copy assignment operator, and destructor.