Revision: 28534
          http://sourceforge.net/p/bibdesk/svn/28534
Author:   hofman
Date:     2024-01-04 10:30:32 +0000 (Thu, 04 Jan 2024)
Log Message:
-----------
local variable to avoid a retain

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

Modified: trunk/bibdesk/BDSKFileSearchIndex.m
===================================================================
--- trunk/bibdesk/BDSKFileSearchIndex.m 2024-01-04 10:26:55 UTC (rev 28533)
+++ trunk/bibdesk/BDSKFileSearchIndex.m 2024-01-04 10:30:32 UTC (rev 28534)
@@ -571,7 +571,7 @@
     
     BDSKPRECONDITION(items);
     
-    [items retain];
+    NSArray *theItems = items;
     
     if ([signatures count]) {
         [self updateStatus:BDSKSearchIndexStatusVerifying];
@@ -641,9 +641,8 @@
         
         [self didUpdate];
         
-        [items release];
-        items = itemsToAdd;
-        
+        theItems = itemsToAdd;
+    
     } else if ([self shouldKeepRunning] && [URLsForIdentifierURLs count]) {
         [rwLock lockForWriting];
         [URLsForIdentifierURLs removeAllObjects];
@@ -652,13 +651,11 @@
     }
     
     // add items that were not yet indexed
-    if ([self shouldKeepRunning] && [items count]) {
+    if ([self shouldKeepRunning] && [theItems count]) {
         [self updateStatus:BDSKSearchIndexStatusIndexing];
-        [self indexFilesForItems:items numberPreviouslyIndexed:numberIndexed];
+        [self indexFilesForItems:theItems 
numberPreviouslyIndexed:numberIndexed];
     }
     
-    [items release];
-
     [self updateStatus:BDSKSearchIndexStatusRunning];
 }
 

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



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to