10 Feb
2003
10 Feb
'03
1:20 p.m.
Black Ice wrote:
As following manner:
shared_ptr<Foo> ptr(new Foo()); ... Foo * p = ptr.release();
No, it cannot. If you want to release ownership, use auto_ptr. In general, you can't destroy the shared_ptr pointer yourself, since you don't know how the shared_ptr has been created.