rule of three
If a class needs a custom destructor, copy constructor, or copy assignment, it needs all three.
The rule of three says that a class managing a resource directly must define the destructor, copy constructor, and copy assignment operator together, because the generated versions do the wrong thing.
See also