[Gc] Memory leak located (corrected error in Map)!

Boehm, Hans 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.

Hans

> -----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
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
>



More information about the Gc mailing list