Can I read RAII and Smart Pointers Overview on EtoBox?
RAII and Smart Pointers Overview by 李磊 is a document available to read on EtoBox.
What is RAII and Smart Pointers Overview about?
This document discusses RAII and smart pointers in C++. It begins with recapping initialisation vs assignment and constructors like copy constructors. It then explains the concept of RAII, which is that object constructors should acquire resources and destructors should release them. This avoids issues with raw pointers in C where the programmer must manually allocate and deallocate. The document also introduces smart pointers like unique_ptr and shared_ptr which implement RAII for dynamic memory. They ensu
- Author
- 李磊
- Language
- EN