Opened 13 years ago
Closed 13 years ago
#3870 closed Bugs (fixed)
memory leak when deserialising a map containing shared_ptrs
Reported by: | Owned by: | Robert Ramey | |
---|---|---|---|
Milestone: | Boost 1.42.0 | Component: | serialization |
Version: | Boost 1.41.0 | Severity: | Problem |
Keywords: | memory leak shared_ptr map | Cc: |
Description
I'm finding that Boost.Serialization is leaking memory when deserialising std::map<std::string,boost::shared_ptr<X>>
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"
I'm using MSCRT, Visual Studio 2008, and boost 1.41.0
I first reported this to the mailing list here: http://lists.boost.org/Archives/boost/2010/01/161190.php
Attachments (2)
Change History (4)
by , 13 years ago
Attachment: | BoostSerialisationMemLeak.cpp added |
---|
by , 13 years ago
Attachment: | BoostSerialisationMemLeak-stacktrace.txt added |
---|
stack trace given when breaking at non-free'd memory allocation
comment:1 by , 13 years ago
I have applied the fix recommended here to get boost serialisation to compile: http://lists.boost.org/Archives/boost/2009/11/159098.php
This could have affected things, but the example won't even compile without it.
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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
unit test for Boost.Test which reports memory leaks