Boost C++ Libraries: Ticket #3870: memory leak when deserialising a map containing shared_ptrs https://svn.boost.org/trac10/ticket/3870 <p> I'm finding that Boost.Serialization is leaking memory when deserialising std::map&lt;std::string,boost::shared_ptr&lt;X&gt;&gt; </p> <p> I'll attach a short unit test demonstrating this, and the stack trace I get by breaking on the non-free'd memory allocation,using "--detect_memory_leak=800" </p> <p> I'm using MSCRT, Visual Studio 2008, and boost 1.41.0 </p> <p> I first reported this to the mailing list here: <a class="ext-link" href="http://lists.boost.org/Archives/boost/2010/01/161190.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2010/01/161190.php</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3870 Trac 1.4.3 Richard Bradley <ricbrad@…> Thu, 28 Jan 2010 10:56:14 GMT attachment set https://svn.boost.org/trac10/ticket/3870 https://svn.boost.org/trac10/ticket/3870 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">BoostSerialisationMemLeak.cpp</span> </li> </ul> <p> unit test for Boost.Test which reports memory leaks </p> Ticket Richard Bradley <ricbrad@…> Thu, 28 Jan 2010 10:56:46 GMT attachment set https://svn.boost.org/trac10/ticket/3870 https://svn.boost.org/trac10/ticket/3870 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">BoostSerialisationMemLeak-stacktrace.txt</span> </li> </ul> <p> stack trace given when breaking at non-free'd memory allocation </p> Ticket Richard Bradley <ricbrad@…> Thu, 28 Jan 2010 16:59:58 GMT <link>https://svn.boost.org/trac10/ticket/3870#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3870#comment:1</guid> <description> <p> I have applied the fix recommended here to get boost serialisation to compile: <a class="ext-link" href="http://lists.boost.org/Archives/boost/2009/11/159098.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2009/11/159098.php</a> </p> <p> This could have affected things, but the example won't even compile without it. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Thu, 28 Jan 2010 21:35:22 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3870#comment:2 https://svn.boost.org/trac10/ticket/3870#comment:2 <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">fixed</span> </li> </ul> <p> I believe that I've fixed this. Now I don't remember whether or not I've checked in the change. It might have already migrated to trunk or release 1.42 Robert Ramey </p> Ticket