Boost logo

Boost :

From: Matt Calabrese (rivorus_at_[hidden])
Date: 2007-04-10 14:29:17


On 4/10/07, Ariane van der Steldt <ariane_at_[hidden]> wrote:
>
> I was wondering if there's interest in a smart pointer, which is able to
> cope with circular references. I think it would make a nice addition to
> the smart_ptr classes already in boost.
>
> The code I have aims to solve this problem, by using two types of
> pointers. The execution thread will work with boost::intrusive_ptr
> (which are allocated on the stack) while classes wishing to point to
> other classes, will use a new type of pointer (named 'reference') that I
> designed. This pointer is aware of the owner of the pointer, in addition
> of the object it points to.
>

I might be more interested if I more clearly saw your proposed design and
solution. Could you provide a brief code example, even if it is just
pseudo-code, and detail exactly what the user witnesses (I.e. when
destruction occurs, etc.)? As well, what is the "non-standard"
initialization you speak of?

-- 
-Matt Calabrese

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