[Gc] Memory leak located (corrected error in Map)!
hans.boehm at hp.com
Sat May 3 18:24:44 PDT 2008
Thanks for the suggestion, and apologies for the confusion. I updated gcinterface.html on the web site and in the distribution to hopefully make this clearer.
> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Christophe Meessen
> Sent: Saturday, April 26, 2008 4:25 PM
> To: gc at napali.hpl.hp.com
> Subject: Re: [Gc] Memory leak located (corrected error in Map)!
> Sorry, I made an error with std::map.
> Christophe Meessen a écrit :
> > For the map, instead of
> > std::map< KeyType, MyType >
> > one has to write
> std::map< KeyType, MyType, std::less< KeyType >,
> gc_allocator<std::pair< const KeyType, MyType> > >
> Note that this is only required when used for member
> variables of a class without finalizer.
> An example of these on the libgc web site would have saved me
> hours of work to locate the memory leak. It was not obvious
> from the current documentation.
> Gc mailing list
> Gc at linux.hpl.hp.com
More information about the Gc