Boost logo

Boost Users :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-06-22 08:32:33


Seweryn Habdank-Wojewódzki skrev:
> Hi!
>
> Is there any smart_ptr and ptr_container that can transfer ownership of
> pointer, to avoid useless copy-construction and destruction of the object.

I guess you can't release a shared_ptr, even though it's use count is 1.

Peter, any reason for not having a release() given that its precondition
is unique() is true?

> Maybe I have to use vector <shared_ptr <T> > instead of ptr_container?

Seems like it.

-Thorsten


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