mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
You should never =delete a destructor! (#1605)
This commit is contained in:
parent
9928c95f97
commit
d45496ff5e
|
@ -4492,7 +4492,7 @@ Destructor rules:
|
|||
* [C.30: Define a destructor if a class needs an explicit action at object destruction](#Rc-dtor)
|
||||
* [C.31: All resources acquired by a class must be released by the class's destructor](#Rc-dtor-release)
|
||||
* [C.32: If a class has a raw pointer (`T*`) or reference (`T&`), consider whether it might be owning](#Rc-dtor-ptr)
|
||||
* [C.33: If a class has an owning pointer member, define or `=delete` a destructor](#Rc-dtor-ptr2)
|
||||
* [C.33: If a class has an owning pointer member, define a destructor](#Rc-dtor-ptr2)
|
||||
* [C.35: A base class destructor should be either public and virtual, or protected and non-virtual](#Rc-dtor-virtual)
|
||||
* [C.36: A destructor may not fail](#Rc-dtor-fail)
|
||||
* [C.37: Make destructors `noexcept`](#Rc-dtor-noexcept)
|
||||
|
|
Loading…
Reference in New Issue
Block a user