Item-8 Prevent exception from leaving destructor
· โ 3 min read
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.