Memory Leak using STL - gcc-3.2 and gcc-2.95.3

Stefan Jones
Fri Oct 4 17:13:00 GMT 2002

On Fri, 2002-10-04 at 22:38, Loren James Rittle wrote:
> Your findings are correct but they are not considered a bug.  The
> memory for l goes back into a cache held within the C++ library; it is
> not systemically leaked.  Compare this program:

Thank you for your swift and informative reply.

I had a feeling that this would be on the commonly reported feature
list, but couldn't find any details. The amount cached is small so it
isn't really a problem. It just makes programs less elegant from the
malloc/free pair-up point of view. 

The "solution" would be to make it get freed on program exit, but that
would serve no purpose except from an artistic view point. Time to
change my memory leak tool, this was just something I was mucking around
with while bored.

Thanks for the info, keep up the good work,

	Stefan Jones

More information about the Libstdc++ mailing list