Boost logo

Boost Users :

Subject: Re: [Boost-users] Reference count in shared_ptr
From: Daniele Barzotti (daniele.barzotti_at_[hidden])
Date: 2009-10-01 11:12:03


 On Thu 01/10/09 17:47 , Roman Perepelitsa wrote:
>
> In this case, is 'delete' called twice for Impl2?
>
> Yes. When you passed a pointer to shared_ptr, you don't own this
> pointer anymore, so you shouldn't delete it manually.
> Roman Perepelitsa.
>

Thanks Roman!
Now I tested it on my skin! :-)

Regards,
Daniele.


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