more cleanup

This commit is contained in:
Mitchell Livingston 2012-03-13 03:49:30 +00:00
parent b6c2134338
commit 87b6288c73
3 changed files with 6 additions and 16 deletions

View File

@ -47,10 +47,7 @@
- (void) dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver: self];
[fHashes release];
[super dealloc];
}

View File

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

View File

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