Transition to ARC

This commit is contained in:
Dmitry Serov
2017-07-29 23:14:22 +07:00
parent 6c30359beb
commit 845dfe6017
63 changed files with 335 additions and 767 deletions

View File

@@ -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]];