Skip to content

Commit

Permalink
Add a comment explaining the use of OS_OBJECT_USE_OBJC
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDennis committed Nov 22, 2013
1 parent 925fc13 commit 568a145
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/FMDatabase.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 568a145

Please sign in to comment.