摘要:
我们都知道在ARC模式下,苹果提供了weak-strong dance技术来应对block调用时的retain cycle问题__weak Dancer *bSelf = self;self.block = ^(){ [bSelf abc];};但是在非ARC模式下没办法使用__weak或者__strong来修饰变量以达到效果。但是我们还有__blcok关键字,神奇的能够达到同样的效果。我们知道被__block关键字修饰的对象不会被block retain或者release,它的生命周期由外部所决定。所以可以在这里使用__block关键字对block内部需要访问的外部对象进行修饰例子:s... 阅读全文
posted @ 2013-06-04 15:09
Joe.xi
阅读(583)
评论(0)
推荐(0)
摘要:
Concurrency and Application Design(2011 Apple Inc. All Rights Reserved. Last updated: 2011-01-19)In the early days of computing, the maximum amount of work per unit of time that a computer could perform was determined by the clock speed of the CPU. But as technology advanced and processor designs be 阅读全文
posted @ 2013-06-04 14:57
Joe.xi
阅读(262)
评论(1)
推荐(0)

浙公网安备 33010602011771号