I tried to change the custom Tab Bar Item image, in interface builder
The image size is 54x58
The application compiles and runs fine ! But when I profile it With Xcode (CMD+I > Leaks) Instruments it shows the following memory leak,
// ... Leaked Object # Address Size Responsible Library Responsible Frame Malloc 48 Bytes 1 0xada86a0 48 Bytes CoreGraphics CGGlyphBitmapCreate Malloc 48 Bytes 1 0xe1905d0 48 Bytes CoreGraphics CGGlyphBitmapCreate Malloc 32 Bytes 1 0xad96170 32 Bytes CoreGraphics C // ....
The Stack trace doesn't show any of my code leaking, The problem also can be triggered by simply setting the custom background images for NavigationBar or TabBar in AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
// Some Look and Feel
[[UITabBar appearance] setBackgroundImage:[UIImage imageNamed:@"nav_bg"]];
[[UINavigationBar appearance] setBackgroundImage:navbar_bkg_image
forBarMetrics:UIBarMetricsDefault];
// where navbar_bkg_image is UIImage
return YES;
}
Any suggestion ?
UINavigationBar
and/orUITabBar
. I see the same leaks when just usingUIImageView
. This is annoying, but not anything you need to worry about. – Rob