Boost logo

Boost :

Subject: Re: [boost] [shifted_ptr] Review Request
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2011-04-06 15:06:47


Phil Bouchard wrote:
> On 4/6/2011 11:23 AM, Thomas Klimpel wrote:
> > There is nothing wrong with deleting an unreferenced node that still
> > references other nodes itself. [...]
> > Still it isn't a problem in the context of Mark& Sweep.
>
> Of course there is something wrong with this ;)
>
> Imagine the nodes in the presentation are widgets. If you have a
> parent
> window which has a child window or dialog window, but the parent window
> is unreferenced. The Mark & Sweep algorithm will simply wipe away the
> parent window and leave the child dialog box on its own.

Then the problem here is that the reference to the parent window went away. It's perfectly OK for the Mark & Sweep algorithm to wipe away unreferenced nodes.


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