[MAPSERVER-USERS] Antwort: Re: leaking memory in java mapscript (was Re: thread safety)
Tamas Szekeres
szekerest at gmail.com
Thu Feb 21 15:55:22 PST 2008
2008/2/21, rich.fromm <nospam420 at yahoo.com>:
>
> it's only the (unsigned char *imgbytes) from above (mapgd.c) that gets
> freed,
> leaking the original (gdImagePtr gdPImg) allocated by the gd code.
>
> At least that's my guess, still exploring further.
>
Rich,
Since gdImagePtr is a struct and allocated on the stack, it will be
freed when it goes out of the actual scope.
> Perhaps I should try to recreate this as a self contained test case, and
> then
> I could file a bug.
>
I think that would be pretty useful.
BTW: I don't really understand your valgrind output. Maybe you have 2
different versions of the gd library out there side by side. The
mapserver core and the mapscript wrapper may use different gd (or crt)
libraries therefore using gdFree doesn't actually free the memory
segment passed by the argument. (I guess)
Best regards,
Tamas
More information about the MapServer-users
mailing list