]> granicus.if.org Git - transmission/commitdiff
retain/autorelease the dictionary when seeding completes, instead of creating a new...
authorMitchell Livingston <livings124@transmissionbt.com>
Tue, 19 Feb 2013 01:17:53 +0000 (01:17 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Tue, 19 Feb 2013 01:17:53 +0000 (01:17 +0000)
macosx/Torrent.m

index f82ddc1db4c224157d79987ed32a9b083dd56389..2d352728670da4060a235e47ccaa0b82818cac0f 100644 (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]];