2010-02-04 89 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