Freeing an pixel packet or image

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
Bob-O-Rama
Posts: 31
Joined: 2007-11-23T15:34:51-07:00

Freeing an pixel packet or image

Post by Bob-O-Rama »

Hi,

I fear this is going to be the "stupidest question ever" but here it goes...

I have a process where I load up a bunch of images, processes them. Along the way I'd like to throw away some of them to save on the RAM requirement. Is there a way to free an image objects memory / discard the image / ...

Thanks!

-- Bob
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Freeing an pixel packet or image

Post by magick »

Image resources are destroyed when an object goes out of scope. Otherwise call delete (e.g. delete _image).
Post Reply