Revision: 28533
          http://sourceforge.net/p/bibdesk/svn/28533
Author:   hofman
Date:     2024-01-04 10:26:55 +0000 (Thu, 04 Jan 2024)
Log Message:
-----------
define variable earlier to avoid a retain

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

Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m     2024-01-04 10:18:09 UTC (rev 28532)
+++ trunk/bibdesk/BibItem.m     2024-01-04 10:26:55 UTC (rev 28533)
@@ -959,6 +959,7 @@
 
 - (void)setPubType:(NSString *)newType withModDate:(NSDate *)date{
     NSString *oldType = [self pubType];
+    NSDictionary *notifInfo = @{BDSKBibItemKeyKey:BDSKPubTypeString, 
BDSKBibItemNewValueKey:newType, BDSKBibItemOldValueKey:oldType};
     
     if ([oldType isEqualToString:newType]) {
                return;
@@ -969,14 +970,10 @@
                                                                                
                                          withModDate:[self dateModified]];
     }
        
-    [oldType retain];
        [self setPubTypeString:newType];
        
     [self setModifiedDate:date];
        [self updateMetadataForKey:BDSKPubTypeString];
-               
-    NSDictionary *notifInfo = @{BDSKBibItemKeyKey:BDSKPubTypeString, 
BDSKBibItemNewValueKey:newType, BDSKBibItemOldValueKey:oldType};
-    [oldType release];
     
     [[NSNotificationCenter defaultCenter] 
postNotificationName:BDSKBibItemChangedNotification
                                                                                
                                object:self

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