Page 1 of 1

How to clear the memory of Image object

Posted: 2013-02-22T03:23:47-07:00
by wizards
Hello,

I want to read a max of 4 (Some times < 4 also) images and should display them simultaneously. If I read two then images will display horizontally i.e one on top and other on bottom. If I read 4 then 4 images will display on 4 parts of monitor. I did this using VC++.

To store 4 images i took an array of Images like

Code: Select all

 Image m_Image[4].
First time if I read 4 images then it takes memory for 4 images. Suppose if one image takes 1MB then for 4 images 4MB.
Second time if I read only two then my application is not realizing the other two images memory.

I want to release memory of the m_Image array before reading second time.

I did not find any method on Magick++ API to clear memory. I can't replace the array with pointers because i need to change lot of code.

Can you please help me how to clear memory.

Re: How to clear the memory of Image object

Posted: 2013-02-26T21:50:40-07:00
by anthony
There should be something to Delete Images...