Skip to main content

4 docs tagged with "best-practices"

View all tags

RAII (Resource Acquisition Is Initialization)

RAII is a fundamental C++ idiom where resource lifetime is tied to object lifetime. Resources are acquired in constructors and released in destructors, ensuring automatic cleanup and exception safety.

Rule of 0/3/5

These rules tell you which special member functions to define based on your class's resource management needs.