Permalink
Browse files

Merge pull request #1 from wilhelmbot/fix/dispatch-release

Removes dispatch_release when iOS >= 6 || OSX >= 1080
  • Loading branch information...
2 parents 2df10b1 + 597c209 commit 86afec407bb58ed39a447a4ebf750044fce3d1b7 @rodowi rodowi committed Sep 24, 2012
Showing with 14 additions and 1 deletion.
  1. +1 −1 MagicalRecord/Core/MagicalRecord+Actions.m
  2. +13 −0 MagicalRecord/CoreData+MagicalRecord.h
@@ -26,7 +26,7 @@ void reset_action_queue(void)
{
if (background_action_queue != NULL)
{
- // dispatch_release(background_action_queue);
+ MRDispatchQueueRelease(background_action_queue);
background_action_queue = NULL;
}
}
@@ -45,3 +45,16 @@
#import "NSEntityDescription+MagicalDataImport.h"
#endif
+
+// @see https://github.com/ccgus/fmdb/commit/aef763eeb64e6fa654e7d121f1df4c16a98d9f4f
+#define MRDispatchQueueRelease(q) (dispatch_release(q))
+
+#if TARGET_OS_IPHONE
+ #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000
+ #define MRDispatchQueueRelease(q)
+ #endif
+#else
+ #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+ #define MRDispatchQueueRelease(q)
+ #endif
+#endif

0 comments on commit 86afec4

Please sign in to comment.