Boost logo

Boost :

Subject: Re: [boost] [Block Pointer] Review Request
From: Phil Bouchard (philippe_at_[hidden])
Date: 2011-05-01 21:52:31


On 5/1/2011 6:39 PM, Emil Dotchevski wrote:
>
> My point is that regardless of the order of destruction, if you have a
> cycle, necessarily you will end up with some dangling pointers (smart
> or otherwise). How does block_ptr protect against bugs arising from
> that?

When memory blocks are found to still exist after standard reference
counting destruction then the remaining memory blocks are necessarily
cyclic. Each block part of the cyclic set will then be destroyed one at
a time but if any other block_ptr are found to reference a block within
the same set then the destruction of the block_ptr in question will be
invalidated. This is how an infinite destruction of a cyclic set is
being prevented.

(A set is a group of memory blocks).

-Phil


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