Subject: Re: [boost] Weak pointer to object not managed by a shared_ptr
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-09-02 14:49:55
Mateusz Loskot wrote:
> One of the smart pointer techniques  explains use of weak_ptr
> pointer to object not managed by a shared_ptr.
> I'm wondering what would be practical use case of that?
> Is it a part of any of known idioms or patterns?
FWIW the serialization library needed to use this
to detect destruction of dependent objects whose
destruction was handled automatically. I'm guessing
this would qualify as a use case.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk