diff options
author | Graham Dennis <graham.dennis@gmail.com> | 2013-11-23 02:21:04 +0400 |
---|---|---|
committer | Graham Dennis <graham.dennis@gmail.com> | 2013-11-23 02:21:04 +0400 |
commit | 568a145649697d65780803d110797fe76ff2acef (patch) | |
tree | b0858832de0b2c937c23e3ee787a69db7b28fc9c | |
parent | 925fc13371a98d7c7ec5a2a56e161e2fc1b355f3 (diff) |
Add a comment explaining the use of OS_OBJECT_USE_OBJC
-rw-r--r-- | src/FMDatabase.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/FMDatabase.h b/src/FMDatabase.h index 63528e8..806ce82 100644 --- a/src/FMDatabase.h +++ b/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) |