Boost logo

Boost :

Subject: Re: [boost] [block_ptr] & Java
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2013-08-31 01:48:08


2013/8/31 Dave Abrahams <dave_at_[hidden]>

>
> on Fri Aug 30 2013, Phil Bouchard <philippe-AT-fornux.com> wrote:
>
> > On 8/30/2013 4:43 PM, Jens Weller wrote:
> >>
> >> I'll just ask about the elephant in the room:
> >> What does your block_ptr do differently then the for years known
> smartpointer implementation in boost?
> >> Why is there a need for reinventing the wheel?
> >
> > Because cyclic pointers need to be handled explicitly with smart
> > pointers whereas with mine it's done implicitly.
>
> There's no one correct destruction order for objects participating in a
> cycle. That's one reason most C++ garbage collectors collect memory but
> don't run destructors. How does your system deal with this?
>

It still can be usable for types with trivial destructor. (However it is
hard to imagine any smart ptr with trivial destructor, so making a cycle of
trivial types with smart pointers seems impossible.).

Can we see the implementation of block pointer?

-- 
Best regards,
Antony Polukhin

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