Revision: 23949
          http://sourceforge.net/p/bibdesk/svn/23949
Author:   hofman
Date:     2019-07-05 22:47:44 +0000 (Fri, 05 Jul 2019)
Log Message:
-----------
no need to extra retain/autorelease download

Modified Paths:
--------------
    trunk/bibdesk/BibItem.m

Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m     2019-07-05 22:40:22 UTC (rev 23948)
+++ trunk/bibdesk/BibItem.m     2019-07-05 22:47:44 UTC (rev 23949)
@@ -3198,8 +3198,9 @@
 
 - (void)itemDownload:(BDSKItemDownload *)download didFinishWithURL:(NSURL 
*)fileURL {
     NSUInteger idx = [download index];
+    BOOL replace = [download replace];
     NSDictionary *userInfo = [NSDictionary dictionaryWithObject:download 
forKey:BDSKItemDownloadKey];
-    [[download retain] autorelease];
+    // download is retained by userInfo
     [downloads removeObject:download];
     [[NSNotificationCenter defaultCenter] 
postNotificationName:BDSKItemDownloadFinishedNotification object:self 
userInfo:userInfo];
     if (fileURL) {
@@ -3209,7 +3210,7 @@
             BDSKLinkedFile *file = [[BDSKLinkedFile alloc] initWithURL:fileURL 
delegate:self];
             if (file) {
                 NSUInteger realIdx = [files indexOfObject:[download 
linkedFile]];
-                if ([download replace] && realIdx != NSNotFound)
+                if (replace && realIdx != NSNotFound)
                     [self removeObjectFromFilesAtIndex:idx];
                 [self insertObject:file inFilesAtIndex:realIdx == NSNotFound ? 
idx : realIdx];
                 if (useLocalUrl == NO) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to