Răsfoiți Sursa

Add a comment explaining the use of OS_OBJECT_USE_OBJC

Graham Dennis 12 ani în urmă
părinte
comite
568a145649
1 a modificat fișierele cu 8 adăugiri și 5 ștergeri
  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)