Ignore:
Timestamp:
Sep 10, 2012, 2:37:29 AM (9 years ago)
Author:
livings124
Message:

properly retain/release nstimers like any other objective-c object

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r13491 r13492  
    538538    //timer to update the interface every second
    539539    [self updateUI];
    540     fTimer = [NSTimer scheduledTimerWithTimeInterval: UPDATE_UI_SECONDS target: self
    541                 selector: @selector(updateUI) userInfo: nil repeats: YES];
     540    fTimer = [[NSTimer scheduledTimerWithTimeInterval: UPDATE_UI_SECONDS target: self
     541                selector: @selector(updateUI) userInfo: nil repeats: YES] retain];
    542542    [[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSModalPanelRunLoopMode];
    543543    [[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSEventTrackingRunLoopMode];
     
    683683   
    684684    [fTimer invalidate];
     685    [fTimer release];
    685686   
    686687    if (fAutoImportTimer)
Note: See TracChangeset for help on using the changeset viewer.