|
Boost Users : |
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2003-05-01 06:57:07
Dear John,
I have done a mistake in the answer to your following
assertion:
> Note also, that you're supposed to initialized
> shared_ptr<T> with a
> *dynamically* allocated T (use new), because it will
> call 'delete' on
> the ptr when the last reference disappears. So you
> are wrong to
> initialize it with the address of a stack variable.
By the destructor of the object, I meant some
mechanism
for "realeasing" the contained object whithin
boost::shared_ptr<>. Silly! Not?
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.
Thanks,
--Hossein
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net