views:

242

answers:

4

Used code in entire project:

- (void)applicationDidFinishLaunching:(UIApplication *)application {    
     UITabBarController *tb = [[UITabBarController alloc] initWithNibName:nil bundle:nil];
     [window addSubview:tb.view];
     [tb release];

     [window setBackgroundColor:[UIColor blackColor]];
     [window makeKeyAndVisible];
}

When the UITabBarController is added to the window view the following leak is detected bij Instruments:

Leaked Object: Malloc 128 Bytes

Address : 0x391ee70

Size : 128 Bytes

Responsible Library : CoreGraphics

Responsible Frame : open_handle_to_dylib_path

This same issue occurs with UINavigationController, but does not appear with UIViewController.

Specs:

Mac OS X 10.6.2

xCode 3.2.1

Instruments 2.0.1

Compiled for iPhone Simulator 3.1.3 | Debug

A: 

I would not worry about it. I'm sure your app will run fine with a one time 128 byte leak.

St3fan
+1 Only worth worrying if it's a continuously occurring leak.
Skilldrick
Still, I like my application to be leak free. I would like to know if the same leak appears with your xCodes.
Mark
yep. Appears here too.
rdesign
A: 

I have the same leak as well, when I call UIApplicationMain.

+1  A: 

Looks like this is a recurring issue - the app I'm currently working on is exhibiting the identical leak (only on the Simulator - not on the device). Would like to have a leak-free product for release, but this annoyance persists. I suppose it's not worth worrying too much about.

ReachWest
A: 

This is asked before.

Comptrol