Top "Smart-pointers" questions

An abstract data type that simulates a pointer while providing additional features, such as automatic garbage collection or bounds checking

Smart pointers and dynamic_cast

I apologize in advance if this was answered already as I looked and could not find the answer. NOTE: this …

c++ polymorphism smart-pointers dynamic-cast
Default value for boost::shared_ptr on class constructor

Suppose I have class like class A{ public: A(int a, boost::shared_ptr<int> ptr){ // whatever! } }; My …

c++ boost smart-pointers multiple-constructors
make_shared and emplace functions

I was trying to find some easy way to emplace elements in a std::vector<std::shared_ptr<…

c++ c++11 shared-ptr smart-pointers
Using unique_ptr to control a file descriptor

In theory, I should be able to use a custom pointer type and deleter in order to have unique_ptr …

c++ c++11 smart-pointers unique-ptr gcc4.7
C++11 Smart Pointer Policies

As I understand it, in the current specification of C++11, one should use: std::unique_ptr<> for one …

c++ memory-management c++11 smart-pointers