
20 Mar
2006
20 Mar
'06
1:43 p.m.
At 04:13 AM 3/20/2006, James Hughes wrote:
Hello All,
I have a couple of classes that I want to self register themselves with a monitoring class. To do this they must pass a shared_ptr of themselves to the monitor register function.
Therefore I need to make a shared_ptr form the this pointer, in the constructor.
Why not use intrusive_ptr? Way back when, I wrote my own equivalent of that instead of using Boost.shared_ptr partly for this very reason (i.e., having to use smart pointers in constructors).