Explorar o código

Add a comment explaining the use of OS_OBJECT_USE_OBJC

Graham Dennis %!s(int64=12) %!d(string=hai) anos
pai
achega
568a145649
Modificáronse 1 ficheiros con 8 adicións e 5 borrados
  1. 8 5
      src/FMDatabase.h

+ 8 - 5
src/FMDatabase.h

@@ -24,11 +24,14 @@
 
     #define FMDBRelease(__v)
 
-	#if OS_OBJECT_USE_OBJC
-		#define FMDBDispatchQueueRelease(__v)
-	#else
-		#define FMDBDispatchQueueRelease(__v) (dispatch_release(__v));
-	#endif
+// If OS_OBJECT_USE_OBJC=1, then the dispatch objects will be treated like ObjC objects
+// and will participate in ARC.
+// See the section on "Dispatch Queues and Automatic Reference Counting" in "Grand Central Dispatch (GCD) Reference" for details. 
+    #if OS_OBJECT_USE_OBJC
+        #define FMDBDispatchQueueRelease(__v)
+    #else
+        #define FMDBDispatchQueueRelease(__v) (dispatch_release(__v));
+    #endif
 #endif
 
 #if !__has_feature(objc_instancetype)