Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-09-21 18:38:38


All the examples I've been able to come up with where I want a weak_ptr
also lead naturally to wanting shared_from_this()... well, actually,
weak_from_this(). The basic paradigm is that a member function is used to
add owned objects which need a back-pointer. Inside a member function you
have a raw pointer, not a shared_ptr, regrettably.

Is there an example which maps naturally onto non-intrusive use of
weak_ptr?

-Dave

-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk