
2 May
2011
2 May
'11
1:16 a.m.
On 5/1/2011 6:01 PM, Emil Dotchevski wrote:
The way to deal with this situation using shared_ptr is to use weak_ptr to break the cycles. I suppose block_ptr solves this problem more elegantly, but how?
The way it is being handled is explained here: https://svn.boost.org/svn/boost/sandbox/block_ptr/libs/smart_ptr/doc/rationa... If blocks of memory are found to still exist after a standard reference counter destruction and that the pointer is living on the stack or data segment then each memory blocks will be destructed and deallocated in the order they were constructed (FIFO). Everything is being handled implicitly. -Phil