An abstract data type that simulates a pointer while providing additional features, such as automatic garbage collection or bounds checking
With the new standard coming (and parts already available in some compilers), the new type std::unique_ptr is supposed …
c++ c++11 smart-pointers auto-ptr unique-ptrWhat is the best method to go about passing a shared_ptr of a derived type to a function that …
c++ casting c++11 shared-ptr smart-pointersDoes std::make_unique have any efficiency benefits like std::make_shared? Compared to manually constructing std::unique_ptr: std::…
c++ c++11 c++14 smart-pointers unique-ptrIn practice with C++, what is RAII, what are smart pointers, how are these implemented in a program and what …
c++ smart-pointers raiiC++ is all about memory ownership - aka ownership semantics. It is the responsibility of the owner of a chunk …
c++ memory-management smart-pointers ownership-semanticsI realized that after calling vector.clear() which hold shared pointers, the destructors of the object which own by shared_…
c++ memory vector smart-pointersGiven the common situation where the lifespan of an owned object is linked to its owner, I can use a …
c++ c++11 smart-pointers unique-ptrI have a query. Can we get the object that a shared pointer points to directly? Or should we get …
c++ shared-ptr shared smart-pointersclass B; class A { public: A () : m_b(new B()) { } shared_ptr<B> GimmeB () { return m_b; } private: …
c++ smart-pointersI have been looking through the Clang source code and I found this snippet: void CompilerInstance::setInvocation( std::shared_ptr&…
c++ c++11 shared-ptr smart-pointers move-semantics