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++.

Freeing an pixel packet or image

Postby Bob-O-Rama » 2011-11-13T10:46:18+00:00

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
Bob-O-Rama
 
Posts: 29
Joined: 2007-11-23T15:34:51+00:00

Re: Freeing an pixel packet or image

Postby magick » 2011-11-13T16:26:33+00:00

Image resources are destroyed when an object goes out of scope. Otherwise call delete (e.g. delete _image).
User avatar
magick
Site Admin
 
Posts: 9546
Joined: 2003-05-31T11:32:55+00:00


Return to Magick++

Who is online

Users browsing this forum: No registered users and 2 guests