Page 1 of 1

magick++ do not release memory as expected

Posted: 2013-01-09T03:37:13-07:00
by collinmsn
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. ...

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;
std::string data;
if (!PrepareImageData(argv[1], data)) {
return 0;
// process image
// when goes to this line,
// memory is expected to have been released
// but that's not the fact.
int ttt = 0; 
return 0;