2010-02-04 92 views
0
#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 retVal; 
} 

当我启动应用程序时,它会发生泄漏。需要帮助查找此代码中的泄漏请

+2

你确定它是你的堆栈的顶部?它是标准的主要功能内容,它不能成为问题的来源 – Vladimir 2010-02-04 15:43:25

回答

0

泄漏不在那里,而是在应用程序委托之前调用NSApplication。最有可能的是它在一个附加的库或框架中。 IIRC,笔尖中的循环引用也可能导致这种情况。看看你的MainWindow笔尖。

+0

它只是说查看“Loaded from RootViewController” – NextRev 2010-02-04 16:52:36