Subject: Re: [boost] [shifted_ptr] Review Request
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2011-04-06 15:43:04
Phil Bouchard wrote:
> On 4/6/2011 12:06 PM, Thomas Klimpel wrote:
> > 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.
> If you have a modal dialog box, you don't want your main window to
> simply disappear just because there is no pointer pointing to it.
It's not just that there is no pointer pointing to the main window. At the moment were Mark & Sweep wipes the main window away, no references of any sort to the main window are left. So even if Mark & Sweep wouldn't wipe it away, it would be an unreachable object that couldn't be used anymore by the program (because the program has sort of forgotten the address of the object).