iOS Memory Leak

Ides

macrumors member
Original poster
Mar 27, 2012
95
0
Hi, I have an app that has a memory leak that I can't seem to get rid of (I don't even know what's causing it). Instruments reports leaks of many objects, but where it normally says the name of the class the object belongs to, that field is blank. So I don't know what kind of object is being leaked. Furthermore, instruments says the responsible library is Foundation, and the responsible frame is NSAutoreleasePool. What does this mean?
 

Ides

macrumors member
Original poster
Mar 27, 2012
95
0
Thanks for the replies everyone, but I found the problem! :) I had a method being called on a background thread and at the beginning of the method I created an autorelease pool, and drained it at the end of the method, just like you're supposed to do when running on different threads. However, I forgot to take into account that there are several places in which my method might "return". I simply added [pool drain]; right before each return statement I had and the problem was solved.