std::weak_ptr is a smart pointer that holds a non-owning ("weak") reference to an object that is managed by std::shared_ptr
std::shared_ptr<int> g_s = std::make_shared<int>(1); void f1() { std::shared_ptr<…
c++ multithreading c++11 weak-ptrRecently 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-ptrWhat 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-ptrI was trying with the cyclic references for boost::shared_ptr, and devised following sample: class A{ // Trivial class public: …
c++ shared-ptr weak-ptr cyclic-referenceI'm currently designing a object structure for a game, and the most natural organization in my case became a tree. …
c++ performance boost weak-ptrIs there a way to std::bind to a std::weak_ptr? I'd like to store a "weak function" callback …
c++ callback bind weak-ptr std-functionI have a class which I know will always be owned by a std::shared_ptr. However passing shared_ptr …
c++ pointers c++14 shared-ptr weak-ptrIt seems kind of inefficient to have to create a temporary shared_ptr just to see if the weak_ptr …
c++ shared-ptr weak-ptrAs in title. This question probably already has an answer but I failed to find one.
c++ weak-ptr raw-pointerI have a set like this: set<weak_ptr<Node>, owner_less<weak_ptr<Node&…
c++ c++11 std unordered-set weak-ptr