2011-12-10 11 views
0

オブジェクト割り当てメッセージの潜在的なリークを取得しています。どのように私はそれをdeallocできますか?BOOL - オブジェクトの潜在的なリーク

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 

    extern BOOL _mainWebViewLoaded; // **-> Potential leak of an object allocated 

    Nimble *nimble = [[Nimble alloc] initWithRootPage:@"main.html" window:self.window serial:@""]; 
    [nimble release]; 
    [self.window makeKeyAndVisible]; 
    while (!_mainWebViewLoaded) { 
     [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1]]; 
    } 
    return YES ; 



} 

答えて

3

BOOLではなく、漏れた自己のウィンドウです。あなたのself.windowを自動解放:

self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; 

推論がよくhere説明されています。

+0

本当にありがとうございます。私は新しいobj-cであり、理解してくれる多くのリンクに感謝しています... – Tel4tel

+0

それは私の喜びでした。私たちはすべて新しいものです! –

関連する問題