title: UIColor Memory Leak Issue
body: <p>I have been trying to solve this issue. Basically I am using the convenience RGB UIColor function to return a UIColor to tint my UINavigationBar, UIToolbar and other objects. However for some reason in Instruments it keeps on saying I have a memory leak every time I load a UIView. Any help would be appreciated. I have simplified the code here for clarity purposes. Here is my function (the function has the RGB and Alpha as variables) which is located in a Global singleton class:</p>
  
  <pre><code>- (UIColor *)returnSelectedColor{
      return [UIColor colorWithRed:(100)/255.0 green:(100)/255.0 blue:(100)/255.0 alpha:(1.0)];
  }
  </code></pre>
  
  <p>In my RootViewController I set this in the ViewWillAppear (sometimes tint can change in between calls however I tried ViewDidLoad but the problem was still there). I tried two different approaches to solve this issue but leak is still present.</p>
  
  <p>The first approach was just to set the tint when view appears like this:</p>
  
  <pre><code>self.navigationController.navigationBar.tintColor=[[GlobalData sharedGlobalData] returnSelectedNavigationColor];
  </code></pre>
  
  <p>The second approach was to create a UIColor property for the view, set it to desired UIColor, and then set the navigationbar tint to this property, when view closes I release the property. This approach also causes a memory leak. Here is the code:</p>
  
  <pre><code>    if(self.navigationToolbarColor!=nil){
          [self.navigationToolbarColor release];
      }
      self.navigationToolbarColor=[[[GlobalData sharedGlobalData] returnSelectedNavigationColor] retain];
  
  self.navigationController.navigationBar.tintColor=self.navigationToolbarColor;
  </code></pre>
  
  <p>Anybody have an idea on what the issue may be? Thanks in advance.</p>