Boost logo

Boost :

From: Andy Glew (glew_at_[hidden])
Date: 1999-08-16 13:58:39

> > 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.

That's what I have been doing so far with containers of live_ptrs.

What I want is to extend and formalize this - I am getting tired of coding
up things like
        if( *iter == 0 ) iter++
for all of the various containers that I have set up.

I basically want to hide the deletion of null pointers from the container.

You can always do this by creating a single sweep-and-delete method,
called whenever you aren't prepared to handle null pointers,
but I am hoping that there is some way that the deletion can be totally
hidden, totally transparent.

Boost list run by bdawes at, gregod at, cpdaniel at, john at