Boost logo

Boost Users :

From: Boris (boriss_at_[hidden])
Date: 2007-09-24 10:42:34


On Mon, 24 Sep 2007 17:05:18 +0300, Thorsten Ottosen
<thorsten.ottosen_at_[hidden]> wrote:

> [...]
>> I asked as it wasn't clear to me if the container takes responsibility
>> for
>> deleting the second instance as after all it isn't stored in the
>> container. I understand now that the code is safe though. Thanks for
>> your
>> reply!
>
> http://www.boost.org/libs/ptr_container/doc/ptr_multimap_adapter.html#modifiers
>
> in particular:
>
> "Effects: Takes ownership of x and returns an iterator pointing to it."

I wasn't sure if this applies to a successful insertion only and decided
to ask here before risking a memory leak. :)

Boris


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