FMDB源码阅读(一)FMDatabase
时间:2021-07-01 10:21:17
帮助过:10人阅读
#if ! __has_feature(objc_arc)
2 #define FMDBAutorelease(__v) ([__v autorelease]);
3 #define FMDBReturnAutoreleased FMDBAutorelease
4
5 #define FMDBRetain(__v) ([__v retain]);
6 #define FMDBReturnRetained FMDBRetain
7
8 #define FMDBRelease(__v) ([__v release]);
9
10 #define FMDBDispatchQueueRelease(__v) (dispatch_release(__v));
11 #else
12 // -fobjc-arc
13 #define FMDBAutorelease(__v)
14 #define FMDBReturnAutoreleased(__v) (__v)
15
16 #define FMDBRetain(__v)
17 #define FMDBReturnRetained(__v) (__v)
18
19 #define FMDBRelease(__v)
20
21 // If OS_OBJECT_USE_OBJC=1, then the dispatch objects will be treated like ObjC objects
22 // and will participate in ARC.
23 // See the section on "Dispatch Queues and Automatic Reference Counting" in "Grand Central Dispatch (GCD) Reference" for details.
24 #if OS_OBJECT_USE_OBJC
25 #define FMDBDispatchQueueRelease(__v)
26 #else
27 #define FMDBDispatchQueueRelease(__v) (dispatch_release(__v));
28 #endif
29 #endif
这里的预编译主要是 FMDB 用来兼容 ARC 和 MRC 的。
FMDB源码阅读(一)FMDatabase
标签:retain detail ati dispatch logs ase log fmdb 源码