1 May
2003
1 May
'03
1:32 p.m.
On Thursday, May 1, 2003, at 04:57 AM, Hossein Haeri wrote:
So the true answer is not to forget to call the reset() member function for every shared_ptr<>, before the end of it's scope.
No, that won't do any good. When you do a reset(), the shared_ptr relinquishes ownership of the thing it points to. If it's the sole owner, it will destroy the object. It's simply an error to put a pointer to a stack object inside a shared_ptr; you can't correct that error with a reset() call. -- Darin