> From: "Peter Dimov" <[EMAIL PROTECTED]>
> 
> I've added a simple mark and sweep "garbage collector" to
> libs/smart_ptr/sp_debug_hooks.cpp that is able to detect unreachable objects
> kept alive by shared_ptr cycles. At the moment it's more a debugging aid,
> and doesn't attempt to free memory, athough it is possible to extend it to
> do so. This is mainly a research project; if you think that it might have a
> practical use let me know. :-)

I think that extending it to free memory in cycles would be a great idea.  Of course, 
this opens a large can of worms about how to handle destruction of objects which refer 
to each other...
 
I think that full GC is one of the major things missing from the C++ language, and the 
appeal of a smart pointer approach, where I pay for GC only when I want/need it, is a 
great idea.


William E. Kempf
[EMAIL PROTECTED]

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to