
Phil Bouchard wrote:
No reference to its data is left but the destruction of the window is premature. If the parent is incrementing a timer in the child widget, then the parent can't be destroyed before its child otherwise the timer will become inert.
If the parent is still able to do something (like incrementing a times in the child widget), then obviously references to the parent still exist. For Mark & Sweep, you are in a context where even every implicit reference is known to the garbage collector. It's clear that you can't strictly guarantee this for a C/C++ program. But in this case, the problem would be that an implicit reference went unnoticed by the Mark & Sweep garbage collector, not that it wiped an unreferenced node. Thomas Klimpel wrote:
I guess "shifted_ptr<>" is a class template, not an "attempt". The "Shifted Pointer library" may be an attempt to offer a garbage collection mechanism with unique advantages. If you immediately start comparing it with other libraries before even properly describing itself, you end up talking more about the other libraries than about the "Shifted Pointer library".
I have a bit the impression that you end up again talking more about another approach (Mark & Sweep in this case) than about the "Shifted Pointer" approach. That's OK for me, just don't blame me if you should find out later that this might have been a waste of time. Regards, Thomas