Discussion:
memory leak in 'display'
Bertram Felgenhauer
2011-02-11 23:04:49 UTC
Permalink
Hi,

'display' leaks memory when displaying a lot of images. The reason is
that the images are not freed properly:

wand/display.c:
[...]
} while ((image != (Image *) NULL) && ((state & ExitState) == 0));
/*
Free image resources.
*/
SetImageStack(image);
RemoveAllImageStack();
[...]

Typically, image will be NULL here, and SetImageStack(image) will cause
all references to the image just displayed to disappear from the stack.

Just removing the SetImageStack(image); line seems to fix the leak.
However I'm not 100% certain that this is the right fix. There may be
something else that has to be done instead of the removed code.

Best regards,

Bertram

P.S. having to subscribe to a mailing list in order to report a bug
is annoying.

Loading...