Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Free image structure created by PiDuplicateImage: (2 Items)
   
Free image structure created by PiDuplicateImage  
Hello,

I am experimenting with images in Photon and have a question about freeing images. If I create an image and then use 
PiDuplicateImage() to create a copy of it I get a new PhImage_t structure allocated. I know I need to set the image->
flags and then call PhReleaseImage() to free the image data but what is the correct way to free the newly allocated 
PhImage_t structure? Using free()?

Thanks.
Re: Free image structure created by PiDuplicateImage  
Apologies for posting to an old topic...

I found out what I needed to know from the documentation. It wasn't explicitly stated anywhere but one of the examples 
shows to use free() to free the PhImage_t structure.