Boost logo

Boost Users :

Subject: Re: [Boost-users] boost serialization memory leaks
From: Robert Ramey (ramey_at_[hidden])
Date: 2011-11-27 18:28:27


U.Mutlu wrote:
> ohad barta wrote, On 2011-11-27 09:03:
>> Hi
>>
>> Im using boost (version 1.47), to serialize a wide variaty of objects
>> (include the stl containers vector and map). All the things are
>> working fine exept from a memory leaks that I (=the memory tool that
>> I work with) detected in the boost code.
>>
>> What am I doing wrong?
>>
>> Thanks In Advance
>>
>> Ohad Barta
>
> Just file a bug report for the benefit of all.
> Here's the bug reporting procedure:
> http://www.boost.org/support/bugs.html

when you do this, please make sure you make a small test case and quadruple
check that your leak detection tool is accurate.

Also note that deserializing a pointer creates a new pointer that has to be
managed. In particular, the tutorial example suffers from exactly this
problem. If you build and run this demo you should see this. I left this
in the demo because adding the memory management in to the tutorial demo
would make it more complicated. I'm going to make an educated guess that
you've overlooked this aspect of pointer de-serialization - which is very
easy to do.

Robert Ramey


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