
11 Nov
2011
11 Nov
'11
10:26 p.m.
on Fri Nov 11 2011, Tim Musson
After re-reading your reply, I think your confusion comes from the following idea: "I still have weak_ptr<> which has a counter ". A line from the weat_ptr<> documentation states that "When the last shared_ptr to the object goes away and the object is deleted, the attempt to obtain a shared_ptr from the weak_ptr instances that refer to the deleted object will fail". So, weak_ptr does not have a counter,
Oh, but it does. There's a separate counter that counts related weak pointers even after the "strong" refcount goes to zero. Whether or not that has any relevance here, I don't know. -- Dave Abrahams BoostPro Computing http://www.boostpro.com