title: Memory leak with singleton
body: <p>I have a singleton class and the lines in the init method cause memory leak, and I don't kwno why...</p>
  
  <p>this is my implementation</p>
  
  <pre><code>static timerController *sngTimer = nil;
  
  @implementation timerController
  
  @synthesize repeatingTimer;
  @synthesize dateComp;
  @synthesize bPause;
  
  +(timerController *) singletonTimer
  {
      @synchronized(self){
          if (sngTimer == nil ) 
          {
              sngTimer = [[timerController alloc]init];
          }
      }
  
      return sngTimer;
  }
  
  -(id)init
  {
      self = [super init];
  
      if (self != nil) {
  
          dateComp = [[NSDateComponents alloc] init];         ///this line cause memory leak
          NSCalendar *gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; ///this line cause memory leak
  
          [dateComp setCalendar:gregorianCalendar]; ///this line cause memory leak
  
          [gregorianCalendar release];
  
          bPause = FALSE;
      }
  
      return self;
  }
  </code></pre>