MJPopupViewController icon indicating copy to clipboard operation
MJPopupViewController copied to clipboard

how free memory when popup is dismissed

Open Piero87 opened this issue 11 years ago • 4 comments

Hello, i display a UIView in your amazing MJPopup and when the view is open the memory increase of 25MB, and it's ok because it's a complex view with a lot of subviews, but when i dismiss the MJPopup the memory doesn't free, but remain of that value, how i can release it?

Piero87 avatar Dec 06 '13 09:12 Piero87

Same problem. Any resolution?

MobileMon avatar Jan 22 '15 20:01 MobileMon

I found that setting the 'viewController = nil' after dismissing works

MobileMon avatar Jan 22 '15 20:01 MobileMon

I have the same issue: I found the solution is: MyViewController *myViewController = (__bridge MyViewController *)(CFRetain((__bridge CFTypeRef)([[MyViewController alloc] initWithContentViewController:otherController]))); [self presentPopupViewController:myViewController animationType:MJPopupViewAnimationSlideTopBottom]; but memory is still leak. anybody can help me?

buidinhnguyen avatar May 05 '15 15:05 buidinhnguyen

Keep a reference to the popover stored as a property. When its dismissed, set the property to nil (as I mentioned above)

MobileMon avatar May 05 '15 15:05 MobileMon