[Gc] Experiencing a leak(probably my own fault)
alex.gaynor at gmail.com
Mon Nov 17 11:24:52 PST 2008
As in turned out the problem was with the string allocator, I was able to
solve this by doing:
typedef std::basic_string<char, std::char_traits<char>, gc_allocator<char> >
typedef std::map<KEY_TYPE, AlObj*, std::less<KEY_TYPE>,
gc_allocator<std::pair<KEY_TYPE, AlObj*> > > KWARG_TYPE;
2008/11/17 Ivan Maidanski <ivmai at mail.ru>
> "Alex Gaynor" <alex.gaynor at gmail.com> wrote:
> > I have this code: http://paste.pocoo.org/show/91282/ . And I am
> > experiencing a leak with this code, if I comment out the contents of
> > then the leak disappears. I assume this is a problem of my own making
> > to not understanding the semantics of the GC. How can I fix this, so
> > the leak no longer occurs.
> > Alex
> As I could see, GC_INIT() call should be added to the beginning of main().
> This may (or may not) solve your problem.
> PS. I can't test it myself because I don't see "src/base.cpp" contents.
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gc