title: NSTimer not stopping?
body: <p>I'm trying to to stop an NSTimer with the following code:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      timer3 = [NSTimer timerWithTimeInterval:5.0 target:self selector:@selector(start) userInfo:nil repeats:YES];
      [[NSRunLoop mainRunLoop] addTimer:timer3 forMode:NSDefaultRunLoopMode];
  }
  
  -(void)invalidate
  {  
      [timer3 invalidate];
      timer3 = nil; 
  }
  </code></pre>
  
  <p>and I call <code>-(void)invalidate</code> from another class like this:</p>
  
  <pre><code>-(void)timer
  {
      ClassOfMyTimer *class = [[ClassOfMyTimer alloc] init];
      [class invalidate];
  }
  </code></pre>
  
  <p>but the timer doesn't stop. Does anyone know what I'm doing wrong?</p>