You must free the image yourself, override the destroy procedure and add in the freeing in there.