3 ms·
That paragraph on smart pointers doesn’t have anything to do with RAII - it’s not even accurate concerning C++ smart pointers, where the standard ‘has a single
by clappski 8y ago
That paragraph on smart pointers doesn’t have anything to do with RAII - it’s not even accurate concerning C++ smart pointers, where the standard ‘has a single owner’ smart pointer doesn’t use ref counting, it uses RAII.
- adrianratnapala 8y agoProbably the resource is older than 2018, and is taking aim shared_ptr (or maybe even auto_ptr?) rather than unique_ptr.
- mattnewport 8y agoBoth unique_ptr and shared_ptr have been standard since C++11 which is also when auto_ptr was deprecated (auto_ptr is/was also not reference counted).