Hi,
when do I have to call MagickRelinquishMemory? Everytime a function of MagickWand returns a char*?
Best regards,
Oliver
When to call MagickRelinquishMemory?
Unless the method has a const signature, you own whatever is returned by a MagickWand method and are responsible to free the memory when you are done with the object. For example MagickGetImageFilename() returns the image filename. Since it is not declared const char * you are responsible for freeing it with MagickRelinquishMemory(). GetImageFromMagickWand(0 returns an image. Free it with MagickDestroyImage(). Darn, there is no MagickDestroyImage(). Until we correct this problem, use DestroyImage().