我从这个应用程序中得到了这些巨大的泄漏,我似乎无法解决这个问题。
负责的 Frame 是 CGDataProviderCreateWithCopyOfData
这是泄漏。
编辑
我认为导致问题的线路
CGRect frame = CGRectMake(0, 0, 320, 49);
UIView *myview = [[UIView alloc] initWithFrame:frame];
myview.backgroundColor = [UIColor blackColor];
[myview addSubview:[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"tabbar-3.png"]]];
if ([[[UIDevice currentDevice] systemVersion] floatValue] < 5) {
[[tabController tabBar] insertSubview:myview atIndex:0];
}else{
[[tabController tabBar] insertSubview:myview atIndex:1];
}
if ([UITabBar instancesRespondToSelector:@selector(setSelectedImageTintColor:)]){
[[tabController tabBar] setSelectedImageTintColor:[UIColor colorWithRed:189.f/255 green:224.f/255.f blue:2.f/255.f alpha:1]];
[[tabController tabBar] setTintColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"g1.png"]]];
[[UITabBar appearance] setSelectedImageTintColor:[UIColor colorWithRed:189.f/255 green:224.f/255.f blue:2.f/255.f alpha:1]];
[[tabController tabBar] setSelectionIndicatorImage:[UIImage imageNamed:@"hover.png"]];
[[UITabBar appearance] setSelectionIndicatorImage:[UIImage imageNamed:@"hover.png"]];
for (int i=0; i<[tabController.viewControllers count]; i++) {
UIViewController *tab= [tabController.viewControllers objectAtIndex:i];
[tab.tabBarItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor colorWithRed:189.f/255 green:224.f/255.f blue:2.f/255.f alpha:1], UITextAttributeTextColor,
[NSValue valueWithUIOffset:UIOffsetMake(0,0)], UITextAttributeTextShadowOffset,
[UIFont fontWithName:@"Lucida Grande-Bold" size:10.0], UITextAttributeFont, nil]
forState:UIControlStateSelected];
}
导致这个问题。我的任务是修复这些泄漏,但需要帮助修复这些泄漏。任何帮助都会很棒。
谢谢