[Gc] Experiencing a leak(probably my own fault)

Alex Gaynor 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>

> Hi!
> "Alex Gaynor" <alex.gaynor at gmail.com> wrote:
> > I have this code: https://paste.pocoo.org/show/91282/ .  And I am
> > experiencing a leak with this code, if I comment out the contents of
> setup()
> > then the leak disappears.  I assume this is a problem of my own making
> due
> > to not understanding the semantics of the GC.  How can I fix this, so
> that
> > 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.
> Bye

"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...
URL: https://napali.hpl.hp.com/pipermail/gc/attachments/20081117/abcb8220/attachment.htm

More information about the Gc mailing list