Check memory use

Hi,
I’ve got a routine which opens many images, displays them and then frees all memory associated, but somewhere I’ve got a leak, memory use just goes up and up. So, is there a way to find where memory is getting used inside Photon structures?

I’m freeing my PhImage_t’s with

image->flags = Ph_RELEASE_IMAGE_ALL;
PhReleaseImage(image);
free(image);

Is that enough, or do I need to free something else? When I did not have the Ph_RELEASE_IMAGE_ALL line, memory use went up a lot faster, so will this definitley release all memory associated with the image?

Cheers

Garry

It’s OK, found the problem, my bad…