From: "David Abrahams" <[EMAIL PROTECTED]> > > Yes, but IIUC the reason the library's not doing it is because you > might get the order wrong, which could cause a problem like a dangling > pointer needed for some destructor.
Not really... The library's not currently doing it because it hasn't been my goal to provide a "real" garbage collected pointer. sp_debug_hooks.cpp is an example that demonstrates what can be done with the debug hooks called by shared_ptr; code using it operates in "safe mode" (or slightly safer mode.) IOW a shared_ptr cycle is still not supposed to happen in bug free programs. That aside, can you think of a reasonable design that does not depend on intentionally created shared_ptr cycles, but still needs a correct destruction order when a cycle is broken? _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost