dito010 / JPNavigationController

This library provides an fullScreen pop and push gesture for UINavigationController with customize UINavigationBar for each single support.
http://www.jianshu.com/p/88bc827f0692
MIT License
362 stars 74 forks source link

Present JPNavigationController得不到释放的问题 #12

Closed RITL closed 7 years ago

RITL commented 7 years ago

十分感谢楼主的导航控制器,在最近的性能检测发现JPNavigationController出现了一点内存泄露,问题在于JPNavigationInteractiveTransitiondelegate属性使用了strong修饰符

/*!
 * \~english
 * delegate
 *
 * \~chinese
 * 代理
 */
@property(nonatomic, strong)id<JPNavigationInteractiveTransitionDelegate> delegate;

修改成weak修饰符即可解决问题

/*!
 * \~english
 * delegate
 *
 * \~chinese
 * 代理
 */
@property(nonatomic, weak)id<JPNavigationInteractiveTransitionDelegate> delegate;
dito010 commented 7 years ago

之前不知道脑子抽风将 delegate 写成 strong, 后来的版本已经改过来了, 你升级到最新的版本就可以了. 谢谢支持.