C++ Constructors and Object Lifecycle
Read these pages in order:
- Constructors and object lifetime
- Constructor overload and delegating constructors
- Default constructor, copy constructor, move constructor
- Copy assignment and move assignment
- The Rule of Three / Rule of Five
- Destructor and cleanup
- RAII Resource Acquisition Is Initialization