title: Obj-C: Memory Leak of Malloc 6.00 KB in Core Graphics Library
body: <p>I am getting these huge leaks from this app and I cant seem to solve this issue.</p>
  
  <p>The responsible Frame is CGDataProviderCreateWithCopyOfData</p>
  
  <p>Here are the leaks.</p>
  
  <p><img src="https://i.stack.imgur.com/QajyH.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/jtsMi.png" alt="enter image description here"></p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The lines I believe are causing the issue</p>
  
  <pre><code>  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] &lt; 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&lt;[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];
          }
  </code></pre>
  
  <p>are causing this issue. I have been tasked to fix these leaks but need help fixing these ones. Any help would be great.</p>
  
  <p>Thanks</p>