Re: Memory leak reading SVG image
Achim Domma <[email protected]> Mon, 10 Oct 2005 09:57:31 +0200
| Newsgroups | gmane.comp.video.graphicsmagick.apis |
|---|---|
| Message-ID | <[email protected]> |
Bob Friesenhahn wrote:
> [...] in that the Image accumulates every MVG drawing command
> since the dawn of (its) time in a huge attribute string with the key
> "[MVG]". [...]
>
> It is likely that adding the line
>
> image.attribute("[MVG]","");
>
> to the loop will eliminate most of the leak by resetting the attribute
> to an empty string.
That seems not to be the problem. I have modified the loop like this:
for (int i=0 ; i < 10000 ; ++i) {
Magick::Image image;
Magick::Blob blob(data.c_str(), data.size());
image.magick("SVG");
image.read(blob);
image.attribute("[MVG]","");
}
So I reset the MVG Attribute, which should already make no difference in
that case, because the Image is contructed/destructed each time. But
memory is still growing.
That's also the case in my original szenario: I have a simple COM
object, which only loads XML data from a string and saves the generated
image to disc. Using this object in a web page generating lots of images
has caused the memory consumption of the IIS to explode.
Let me know if I can help to track down the problem.
regards,
Achim
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl