Boost C++ Libraries: Ticket #4483: [serialization] test_non_default_ctor2.cpp leaks FloatValueHolder instance https://svn.boost.org/trac10/ticket/4483 <p> The testcase should serialize member <code>A::floatValue</code> (type <code>FloatValueHolder*</code>) by value instead of through a pointer. Serializing through a pointer causes the instance created by <code>A</code>'s c'tor to be overwritten by a newly created instance, leaking the original. </p> <p> Using </p> <pre class="wiki"> ar &amp; BOOST_SERIALIZATION_NVP(*floatValue) </pre><p> instead fixes the problem </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4483 Trac 1.4.3 Robert Ramey Wed, 04 Aug 2010 19:08:01 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4483#comment:1 https://svn.boost.org/trac10/ticket/4483#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> This can't be correct. </p> <p> ar &amp; * x </p> <p> wouldn't likely give what is desired. I works around version among other things. </p> <p> If the test is leaking memory, I would be an issue with test itself rather than the library. You could send a suggested patch for the test if you want. But, I'm sure this applies to lots of tests as well as some or all of the demos. The first demo in the tutorial leaks memory. I tolerate this since I didn't want the tutorial clouded up with issues unrelated to the serialization library. </p> <p> Robert Ramey </p> Ticket