4 May 2008 03:24
RE: Memory leak located (corrected error in Map)!
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@... > [mailto:gc-bounces@...] On Behalf Of Christophe Meessen > Sent: Saturday, April 26, 2008 4:25 PM > To: gc@... > 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. > _______________________________________________(Continue reading)
RSS Feed