FPPopover icon indicating copy to clipboard operation
FPPopover copied to clipboard

FPPopover leak under ARC

Open xfreebird opened this issue 11 years ago • 4 comments

Hi,

Using the Profiler tool I've noticed that the FPPopover view is not released after the popover is nil'ed or dismissed.

xfreebird avatar Jul 06 '13 09:07 xfreebird

My solution was too change the following code fragment from PopoverController.m:

-(id)initWithViewController:(UIViewController*)viewController
                   delegate:(id<FPPopoverControllerDelegate>)delegate

...


#if __has_feature(objc_arc)
        //ARC on

         id bself = self;
to

-(id)initWithViewController:(UIViewController*)viewController
                   delegate:(id<FPPopoverControllerDelegate>)delegate

... 

#if __has_feature(objc_arc)
        //ARC on

        __weak id bself = self;

xfreebird avatar Jul 06 '13 11:07 xfreebird

THANK YOU SO MUCH FOR POSTING A SOLUTION I HAD THE SAME PROBLEM!!!

ryanmsusa avatar Aug 26 '13 20:08 ryanmsusa

A leak never occurred for me, live bytes just kept going up though

ryanmsusa avatar Aug 26 '13 20:08 ryanmsusa

xfreebird you rock. This memory leak was hard to trace!

hahnemann avatar Jun 13 '14 18:06 hahnemann