1. block中的strongSelf
这种情况比较常见,也是大多数人比较会处理的,就是block和self互相持有,这时只要把self换成WeakSelf就可以解决.
2.持有strong属性的controller
当想让一个类持有一个其他的类时,比如:
self.presenter.owner = self;
这时属性中写成这样,会造成互相强持有,不能释放,导致内存泄露:
@property (nonatomic, strong ) TAF_SocialAround_Controller *owner;
要改为
@property (nonatomic, weak ) TAF_SocialAround_Controller *owner;