Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 1999-08-16 12:49:38


From: Reid Sweatman <reids_at_[hidden]>
> > I think an std::map of my weak_ptr, combined with a function
> > to sweep out
> > null pointers, might provided such a deferred map.
>
> I'll have to refresh my memory of weak_ptr, but from what I recall, you may
> be right. I'd have to think about the behavior when a referenced object
> dies, though, before I'd be sure we're talking about the same thing.

The idea is just that weak_ptr goes to null when the last shared_ptr
goes away, so they stay in the map until overwritten or erased.


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