|
Boost : |
From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2002-09-10 23:13:11
Larry Evans wrote:
[...]
> However, pN.clear() should NOT collect anything at the point it's
> called above because pN.get() and pN->p.get() are both still "live".
>
> In addition, clear should be a static method since it deals with
> with all placed_ptr's, not just one. After exit from the {}, the static
> collect() should be called to collect the "dead" objects.
No, no... this is still part of my simple gc; I need the address of the
specific node to explicitly delete it. I just wanted to clean up the class
before going further. This way cyclic container writers could at least
delete their nodes easily.
placed_ptr_gc::clear() and placed_ptr::clear() are redundant also.
> A good definition of "live" and "dead" are at:
> http://www.memorymanagement.org/glossary/
Wow, thanks.
-- Philippe A. Bouchard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk