NSAutoReleasePool Leaks on allocWithZone
So this has been confusing me for a while. I am running my app in the "Profile" Mode trying to find memory leaks in my app. I think I got all of them expect when I click on the Map part of my appli开发者_如何学JAVAcation it reports back that a reference to NSAutoreleasePool
was leaked from the Foundation Library. I check the trace of the object but it only reports back from the method allocWithZone
. It seems to leak only once on matter how many times I alloc
and dealloc
that view controller. I did a search of my code and the only reference I make to NSAutoreleasePool
is in the main.m file. Is this an Apple bug (which I doubt) or am I doing something wrong?
main.m
#import <UIKit/UIKit.h>
int main(int argc, char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
Looks like it was an Apple bug. The same amount of memory is leaked in the other question which leads me to believe they are the same bug. I did an extensive code audit and nothing seemed to be working to get rid of the leak. Oh well I hope they fix it soon. NSAutoReleasePool Leaks on allocWithZone
精彩评论