|
Boost Users : |
From: Michael Brinkmann (yg-boost-users_at_[hidden])
Date: 2002-12-18 11:14:48
Hi Darin, Stephen, Peter,
> Yes. There is a relatively new feature in the latest versions of
> shared_ptr, shared_from_this.
>
> The way you use it in Boost 1.29.0 is to the class you want to store a
> pointer to inherit from boost::counted_base. You can use multiple
> inheritance if you already have another base class. Then you can use
> shared_from_this to turn a raw pointer to this class into a shared_ptr.
> I expect this feature is going to be in future versions of shared_ptr,
> but the name of the class you have to inherit from may change.
it works perfect. Thank you!
bye
Michael
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