FSPopoverView icon indicating copy to clipboard operation
FSPopoverView copied to clipboard

内存泄漏

Open jiasongs opened this issue 4 years ago • 2 comments

PopoverAction *action1 = [PopoverAction actionWithTitle:@"Title" handler:^(PopoverAction *action) { // 该Block不会导致内存泄露, Block内代码无需刻意去设置弱引用. }]; 此注释有误,PopoverAction持有Block,PopoverView持有actions,actions持有PopoverAction,进而PopoverView持有Block,若此Block中持有某个控制器self,self持有PopoverView,或者此Block中持有PopoverView,则会造成循环引用。PopoverView代码中含有_actions = nil;的片段,但是没有覆盖全部场景,当点击浮层hide的时候,并没有_actions = nil;,则导致PopoverView造成内存泄漏。

jiasongs avatar Jun 02 '20 02:06 jiasongs

最近准备重构该控件,到时候解决该问题,感谢你的反馈。

lifution avatar Jun 12 '20 14:06 lifution

期待重构

lavender1026 avatar Jun 28 '20 08:06 lavender1026