diff --git a/macosx/Badger.m b/macosx/Badger.m index b21d0c3d5..fb32d06b2 100644 --- a/macosx/Badger.m +++ b/macosx/Badger.m @@ -47,10 +47,7 @@ - (void) dealloc { - [[NSNotificationCenter defaultCenter] removeObserver: self]; - [fHashes release]; - [super dealloc]; } diff --git a/macosx/Controller.m b/macosx/Controller.m index d4740ace9..7c79c38a6 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -1397,10 +1397,9 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy { NSArray * torrents = [dict objectForKey: @"Torrents"]; if (returnCode == NSAlertDefaultReturn) - [self confirmRemoveTorrents: torrents deleteData: [[dict objectForKey: @"DeleteData"] boolValue]]; - else - [torrents release]; + [self confirmRemoveTorrents: [torrents retain] deleteData: [[dict objectForKey: @"DeleteData"] boolValue]]; + [torrents release]; [dict release]; } @@ -2745,12 +2744,8 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy [fAutoImportTimer release]; fAutoImportTimer = nil; } - - if (fAutoImportedNames) - { - [fAutoImportedNames release]; - fAutoImportedNames = nil; - } + [fAutoImportedNames release]; + fAutoImportedNames = nil; [self checkAutoImportDirectory]; } diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index 41c9549c0..2fc84be19 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -836,14 +836,12 @@ - (void) togglePiecesBar { - //stop previous animation - if (fPiecesBarAnimation) - [fPiecesBarAnimation release]; - NSMutableArray * progressMarks = [NSMutableArray arrayWithCapacity: 16]; for (NSAnimationProgress i = 0.0625; i <= 1.0; i += 0.0625) [progressMarks addObject: [NSNumber numberWithFloat: i]]; + //this stops a previous animation + [fPiecesBarAnimation release]; fPiecesBarAnimation = [[NSAnimation alloc] initWithDuration: TOGGLE_PROGRESS_SECONDS animationCurve: NSAnimationEaseIn]; [fPiecesBarAnimation setAnimationBlockingMode: NSAnimationNonblocking]; [fPiecesBarAnimation setProgressMarks: progressMarks];