MZFormSheetPresentationController icon indicating copy to clipboard operation
MZFormSheetPresentationController copied to clipboard

Memory Leak issue

Open asifbilal786 opened this issue 5 years ago • 3 comments

Hi

First thanks for the great library. It's really useful.

But I am facing the memory leaks when using this library. I have debug into the code and came to know that this code is causing memory leak.

self.propertyAnimator = [[UIViewPropertyAnimator alloc] initWithDuration:1.0 curve:UIViewAnimationCurveLinear animations:^{ self.blurBackgroundView.effect = nil; }];

To resolve it I have changed it to weak self as instructed by Apple to avoid any memory issue.

__weak MZFormSheetPresentationController *weakSelf = self; self.propertyAnimator = [[UIViewPropertyAnimator alloc] initWithDuration:1.0 curve:UIViewAnimationCurveLinear animations:^{ weakSelf.blurBackgroundView.effect = nil; }];

Please update the pod with resolution of this issue. Thanks!!!

asifbilal786 avatar Nov 26 '18 12:11 asifbilal786

Thanks, thats true, this is a memory leak, can you make PR ?

m1entus avatar Nov 26 '18 12:11 m1entus

I have created Pull Request for this issue. Please accept this.

asifbilal786 avatar Nov 26 '18 16:11 asifbilal786

Don't see Pull Request, you probably only have added commit to your repo

m1entus avatar Nov 27 '18 08:11 m1entus