An abstract data type that simulates a pointer while providing additional features, such as automatic garbage collection or bounds checking
I have a class hierarchy as follows: class BaseSession : public boost::enable_shared_from_this<BaseSession> class DerivedSessionA : …
c++ boost smart-pointers unique-ptr dynamic-castI'm trying to "modernize" some existing code. I have a class which currently has a member variable "Device* device_". It …
c++ smart-pointers unique-ptrHow do smart pointers handle arrays? For example, void function(void) { std::unique_ptr<int> my_array(new …
c++ c++11 smart-pointers#include <memory> class bar{}; void foo(bar &object){ std::unique_ptr<bar> pointer = &object; } …
c++ smart-pointers c++14 unique-ptrFor example, there is a function that finds an object and returns shared_ptr if object is found, and must …
c++ shared-ptr smart-pointers weak-ptrAfter reading this answer, it looks like it is a best practice to use smart pointers as much as possible, …
c++ pointers boost smart-pointersJust recently I switched the language of my project to use C++ from C. With C, I used malloc and …
c++ memory-management smart-pointersI recently started porting lots of my existing C++ application code to over to C++11 and now that I am …
c++ lambda c++11 smart-pointers unique-ptrComparisons, Pros, Cons, and When to Use? This is a spin-off from a garbage collection thread where what I thought …
c++ smart-pointers c++-faqI read in a few articles that raw pointers should almost never be used. Instead they should always be wrapped …
c++ api pointers smart-pointers