retain/autorelease the dictionary when seeding completes, instead of creating a new dictionary

This commit is contained in:
Mitchell Livingston
2013-02-19 01:17:53 +00:00
parent 539aeb2edd
commit 1de3ddfbc9
+1 -3
View File
@@ -1823,9 +1823,7 @@ int trashDataFile(const char * filename)
{
case TR_SEED:
case TR_PARTIAL_SEED:
//simpler to create a new dictionary than to use statusInfo - avoids retention chicanery
[[NSNotificationCenter defaultCenter] postNotificationName: @"TorrentFinishedDownloading" object: self
userInfo: [NSDictionary dictionaryWithObject: [statusInfo objectForKey: @"WasRunning"] forKey: @"WasRunning"]];
[[NSNotificationCenter defaultCenter] postNotificationName: @"TorrentFinishedDownloading" object: self userInfo: [[statusInfo retain] autorelease]];
//quarantine the finished data
NSString * dataLocation = [[self currentDirectory] stringByAppendingPathComponent: [self name]];