[A5] Memory Leak - al_fopen_interface
I'm doing some memory leak analysis on my iOS device and so far so good, with the exception of a leak reported from al_fopen_interface (3 times during an 8 minute test run of my app.)
Seems like a pretty simple routine. Not sure whats leaking here?
Am I not cleaning up the returned ALLEGRO_FILE object afterwards? Does al_fclose() not cleanup the object?
Would rather not have any leaks if submitting to AppStore... I've heard they can be pretty particular...
Thread #611133. Printed from Allegro.cc
Memory leaks reported by the "Leaks" tool in instruments (and anything else really, like valgrind) report the source of the allocated memory, not where the "leak occurred" which would probably when the last reference to allocated memory is lost. The routine looks ok to me. If you're sure you're calling al_fclose on ALL handles returned from this then the leak may be in drv->fi_fopen in your implementation.
EDIT: it could also be your fclose implementation or somewhere else in your interface.