|
Boost Users : |
From: me22 (me22.ca_at_[hidden])
Date: 2006-02-15 20:08:14
On 2/15/06, Perry Smith <pedz_at_[hidden]> wrote:
> The first has the extra overhead of creating a second shared_ptr.
> The second worries me... It just seems like "reset" is not what I
> would call the method to do what I want to do (but maybe it is).
>
reset is exactly what you're looking for
http://boost.org/libs/smart_ptr/shared_ptr.htm#reset
int fun() {
dog.reset( new int );
// ...
}
~ Scott
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