Revision: 28401
http://sourceforge.net/p/bibdesk/svn/28401
Author: hofman
Date: 2023-10-10 16:11:01 +0000 (Tue, 10 Oct 2023)
Log Message:
-----------
no need for separate macro to detroy a block, it is also an object
Modified Paths:
--------------
trunk/bibdesk/BDSKMergeController.m
trunk/bibdesk/BDSKSearchGroup.m
trunk/bibdesk/BDSKWebGroup.m
trunk/bibdesk/Bibdesk_Prefix.pch
trunk/bibdesk/NSColor_BDSKExtensions.m
Modified: trunk/bibdesk/BDSKMergeController.m
===================================================================
--- trunk/bibdesk/BDSKMergeController.m 2023-10-10 15:27:30 UTC (rev 28400)
+++ trunk/bibdesk/BDSKMergeController.m 2023-10-10 16:11:01 UTC (rev 28401)
@@ -160,7 +160,7 @@
[self merge];
} else if (completionHandler) {
completionHandler(NO, BDSKAutoGeneratedNone);
- BDSKBLOCKDESTROY(completionHandler);
+ BDSKDESTROY(completionHandler);
}
[super dismiss:sender];
}
@@ -404,7 +404,7 @@
completionHandler(NO, BDSKAutoGeneratedNone);
NSBeep();
}
- BDSKBLOCKDESTROY(completionHandler);
+ BDSKDESTROY(completionHandler);
}
- (void)mergeOverwriting {
Modified: trunk/bibdesk/BDSKSearchGroup.m
===================================================================
--- trunk/bibdesk/BDSKSearchGroup.m 2023-10-10 15:27:30 UTC (rev 28400)
+++ trunk/bibdesk/BDSKSearchGroup.m 2023-10-10 16:11:01 UTC (rev 28401)
@@ -540,7 +540,7 @@
BDSKDESTROY(server);
if (completionHandler) {
completionHandler(publications);
- BDSKBLOCKDESTROY(completionHandler);
+ BDSKDESTROY(completionHandler);
[self release];
}
}
Modified: trunk/bibdesk/BDSKWebGroup.m
===================================================================
--- trunk/bibdesk/BDSKWebGroup.m 2023-10-10 15:27:30 UTC (rev 28400)
+++ trunk/bibdesk/BDSKWebGroup.m 2023-10-10 16:11:01 UTC (rev 28401)
@@ -414,7 +414,7 @@
- (void)handleGroupUpdatedNotification:(NSNotification *)notification {
if ([group isRetrieving] == NO && completionHandler) {
completionHandler([self publications]);
- BDSKBLOCKDESTROY(completionHandler);
+ BDSKDESTROY(completionHandler);
[[NSNotificationCenter defaultCenter] removeObserver:self];
[self release];
}
Modified: trunk/bibdesk/Bibdesk_Prefix.pch
===================================================================
--- trunk/bibdesk/Bibdesk_Prefix.pch 2023-10-10 15:27:30 UTC (rev 28400)
+++ trunk/bibdesk/Bibdesk_Prefix.pch 2023-10-10 16:11:01 UTC (rev 28401)
@@ -81,8 +81,7 @@
#define BDSKCFDESTROY(variable) do { if (variable) CFRelease(variable);
variable = NULL; } while (0)
#define BDSKZONEDESTROY(variable) do { if (variable)
NSZoneFree(NSZoneFromPointer((void *)variable), (void *)variable); variable =
NULL; } while (0)
#define BDSKDISPATCHDESTROY(variable) do { if (variable)
dispatch_release(variable); variable = NULL; } while (0)
- #define BDSKBLOCKDESTROY(variable) do { if (variable)
Block_release(variable); variable = NULL; } while (0)
-
+
// see e.g.
http://www.mulle-kybernetik.com/artikel/Optimization/opti-7.html, perhaps this
could be improved on 64-bits
#define BDSKHash(self) (((NSUInteger) self >> 4) | ((NSUInteger) self <<
(32 - 4)))
Modified: trunk/bibdesk/NSColor_BDSKExtensions.m
===================================================================
--- trunk/bibdesk/NSColor_BDSKExtensions.m 2023-10-10 15:27:30 UTC (rev
28400)
+++ trunk/bibdesk/NSColor_BDSKExtensions.m 2023-10-10 16:11:01 UTC (rev
28401)
@@ -582,7 +582,7 @@
}
- (void)dealloc {
- BDSKBLOCKDESTROY(colorGenerator);
+ BDSKDESTROY(colorGenerator);
[super dealloc];
}
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