Top "Shared-ptr" questions

Reference counted smart pointer class implementing shared ownership

Errors in std::make_shared() when trying to make shared_ptr?

(Using Visual Studio 2010) I'm trying to create a shared_ptr of an existing class in my project (class was written …

c++ c++11 shared-ptr visual-c++-2010 make-shared
is it better to use shared_ptr.reset or operator =?

I'm trying to wrap my head around the new idioms for C++11. It seems that with shared_ptr at least, …

c++ c++11 shared-ptr
Why shared_from_this can't be used in constructor from technical standpoint?

In the book The C++ Standard Library at page 91 I have read this about shared_from_this(): The problem is …

c++ constructor shared-ptr
Are there any downsides with using make_shared to create a shared_ptr

Are there any downsides with using make_shared<T>() instead of using shared_ptr<T>(new …

c++ boost shared-ptr
How to combine the use of std::bind with std::shared_ptr

I need to do something like this more than often: AsyncOperation * pAsyncOperation = new AsyncOperation(); auto bindOperation = std::bind(&AsyncOperation::…

c++ c++11 std shared-ptr stdbind
What is diffrence between lock() and expired()? weak_ptr C++

Recently I started at C++11. I studied about weak_ptr. There exist two ways of getting raw pointer. lock() function …

c++ c++11 shared-ptr smart-pointers weak-ptr
std::unique_ptr vs std::shared_ptr vs std::weak_ptr vs std::auto_ptr vs raw pointers

What are the equivalent uses of each smart pointer in comparison to similar (but not limited to) some advanced techniques …

c++ shared-ptr unique-ptr auto-ptr weak-ptr
shared_ptr and the this-pointer

OK, I started using shared-pointers and pass shared-pointers as much as possible. No conversion to raw pointers anymore. This works …

c++ this this-pointer shared-ptr
What is the difference between auto pointers and shared pointers in C++

I have heard that auto pointers own their object whereas shared pointers can have many objects pointing to them. Why …

c++ shared-ptr smart-pointers auto-ptr
Passing const shared_ptr<T>& versus just shared_ptr<T> as parameter

I've been reading quite a number of discussions about performance issues when smart pointers are involved in an application. One …

c++ shared-ptr