Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-02-10 08:20:57


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.


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