开发者

Need help finding the leak in this code please

开发者 https://www.devze.com 2022-12-19 08:54 出处:网络
#import <UIKit/UIKit.h> int main(int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
#import <UIKit/UIKit.h>

int main(int argc, char *argv[]) {

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, nil);<-----This line gets highlighted as the leak
    [pool release];
    return 开发者_Go百科retVal; 
}

It leaks right when I start the app.


The leak is not there but rather in something the NSApplication calls before the app delegate. Most likely its in an added library or framework. IIRC, a circular reference in a nib can also cause this. Look in your MainWindow nib.

0

精彩评论

暂无评论...
验证码 换一张
取 消