mirror of
https://github.com/transmission/transmission.git
synced 2026-05-02 22:52:37 +01:00
Transition to ARC
This commit is contained in:
@@ -61,7 +61,7 @@ tr_session * fLib = NULL;
|
||||
{
|
||||
[self updateStats];
|
||||
|
||||
fTimer = [[NSTimer scheduledTimerWithTimeInterval: UPDATE_SECONDS target: self selector: @selector(updateStats) userInfo: nil repeats: YES] retain];
|
||||
fTimer = [NSTimer scheduledTimerWithTimeInterval: UPDATE_SECONDS target: self selector: @selector(updateStats) userInfo: nil repeats: YES];
|
||||
[[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSModalPanelRunLoopMode];
|
||||
[[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSEventTrackingRunLoopMode];
|
||||
|
||||
@@ -117,11 +117,7 @@ tr_session * fLib = NULL;
|
||||
- (void) windowWillClose: (id) sender
|
||||
{
|
||||
[fTimer invalidate];
|
||||
[fTimer release];
|
||||
fTimer = nil;
|
||||
|
||||
[fStatsWindowInstance autorelease];
|
||||
fStatsWindowInstance = nil;
|
||||
}
|
||||
|
||||
+ (void) restoreWindowWithIdentifier: (NSString *) identifier state: (NSCoder *) state completionHandler: (void (^)(NSWindow *, NSError *)) completionHandler
|
||||
@@ -180,7 +176,6 @@ tr_session * fLib = NULL;
|
||||
[fDownloadedAllField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%@ total", "stats total"), [NSString stringForFileSize: statsAll.downloadedBytes]]];
|
||||
[fDownloadedAllField setToolTip: [byteFormatter stringFromByteCount: statsAll.downloadedBytes]];
|
||||
|
||||
[byteFormatter release];
|
||||
|
||||
[fRatioField setStringValue: [NSString stringForRatio: statsSession.ratio]];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user