Parse源码学习笔记

2015-11-09  本文已影响75人  frank_kk

weak:


/*!

Creates a __weak version of the variable provided,

which can later be safely used or converted into strong variable via @strongify.

*/

#define weakify(var) \

try {} @catch (...) {} \

__weak __typeof__(var) var ## _weak = var;

strong:


/*!

Creates a strong shadow reference of the variable provided.

Variable must have previously been passed to @weakify.

*/

#define strongify(var) \

try {} @catch (...) {} \

__strong __typeof__(var) var = var ## _weak;

上一篇 下一篇

猜你喜欢

热点阅读