|      1simon4761      2015-10-19 15:20:35 +08:00 我用的时候并没有刻意用 weakSelf.在有些库里面有对 self 进行处理。。所以可以不用 weakSelf.不过不知道 masonry 里有没做处理。 | 
|  |      2SeanChense OP @simon4761 一开始我都有做 weak strong dance ,今天看到了这个 issue https://github.com/SnapKit/Masonry/issues/251 似乎是不需要的。 | 
|  |      3jesse_luo      2015-10-19 18:10:28 +08:00 不需要吧 | 
|  |      4SeanChense OP @jesse_luo 似乎很多人都这么做了 | 
|      5zjmdp      2015-10-19 18:24:42 +08:00 一直没用,用过 instruments 做过 profile ,没看到有泄露 | 
|  |      6jesse_luo      2015-10-19 19:16:06 +08:00  1 @SeanChense self 没有 retain 这个 block | 
|  |      7loveuqian      2015-10-19 19:17:31 +08:00 它示例代码里也没用 weak 啊 | 
|  |      8mornlight      2015-10-19 19:21:08 +08:00 我从来没用过。。。 | 
|      9jackisnotspirate      2015-10-19 19:38:39 +08:00 - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *))block { self.translatesAutoresizingMaskIntoConstraints = NO; MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; block(constraintMaker); return [constraintMaker install]; } | 
|  |      10PhilCai      2015-10-20 10:33:24 +08:00  1 没有,因为那个 block 没有被当作属性 copy | 
|  |      11dorentus      2015-10-20 11:49:26 +08:00  1 不需要。 它的 Swift 版, SnapKit ,对应的方法 snp_makeConstraints 把最后的 block 参数标记成了 @noescape ,即这个 block 的生存期不会超出这个方法的生存期,且不会被任意方 retain 或 copy 。 | 
|  |      12hustlzp      2015-10-20 19:38:22 +08:00 没有。 |