id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 2645,multimap size() returns bad count,Daniel Christian ,Ion Gaztañaga,"After exhausting all available shared memory by inserting objects into a multimap until a bad_alloc exception is thrown, then deleting all the objects that were successfully inserted, calling size() will still return 1 even though the container is really empty. Also, memory is leaked if the exception is thrown during the insert as subsequent rounds of insert/delete cycles are able to insert less items than the iteration than came before it. Some info about my test scenario... The object that I'm inserting contains an interprocess vector and dynamically allocates an interprocess_mutex using the vector's shared memory allocator storing it's pointer in the object itself. Also, the size of the vector is dynamic, but is bounded to a maximum size so that the maximum size of an object can be predicted. I was able to work around this by performing a successful alloc/dealloc of a size equal to or larger than the size of the inserted object before doing the insert. If the alloc fails then I do not perform the insert. If I do this then the size() remains consistent and no memory is leaked. ",Bugs,closed,Boost 1.38.0,interprocess,Boost 1.37.0,Problem,wontfix,,