magick++ do not release memory as expected

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
collinmsn
Posts: 4
Joined: 2012-03-14T21:32:34-07:00
Authentication code: 8675308

magick++ do not release memory as expected

Post by collinmsn » 2013-01-09T03:37:13-07:00

hi,
I have a large gif file (about 15M) which requires more memory than the resource limit setting in policy.xml. So an exception is thrown when processing this file. After that the memory allocated by magick is not released as expected. The policy.xml, c++ code, compile script and sample image can be downloaded here. https://www.dropbox.com/sh/3esh3go7x19j ... memory.zip

following is code snip

Code: Select all

int main(int argc, const char* argv[]) {
if (argc != 2) {
printf("usage: %s /path/to/image/file\n", argv[0]);
return 0;
}
MagickCore::ResourceComponentGenesis();
{
std::string data;
if (!PrepareImageData(argv[1], data)) {
return 0;
}
// process image
foo(data);
// when goes to this line,
// memory is expected to have been released
// but that's not the fact.
int ttt = 0; 
}
return 0;
}

Post Reply