2 ms·
RAII, like a lot of C++ concepts, finds the most use in library-like code (stdlib especially), where it needs to be super generic. Application developers get th
by ninkendo 1y ago
RAII, like a lot of C++ concepts, finds the most use in library-like code (stdlib especially), where it needs to be super generic. Application developers get the benefits of these concepts by simply using these libraries, even if they don't have to care about them themselves. As an application developer, you mostly focus on classes as plain-old-data and functions to work on them, so you don't need to mess about with custom destructors or move-constructors or other RAII stuff.