MBProgressHUD icon indicating copy to clipboard operation
MBProgressHUD copied to clipboard

Memory Leaks on indicator

Open fabianofrancesconi opened this issue 16 years ago • 3 comments

I discovered a mem leak when you init the indicator (row 133 MBProgressHud.m). I guess an "[indicator release]" could fix that issue, as follows:

if (indicator) {
    [indicator removeFromSuperview];
    [indicator release];
}

Am I right?

fabianofrancesconi avatar Jun 03 '10 11:06 fabianofrancesconi

"self.indicator = nil" on line 130 should release the indicator since "self.indicator" is a retain type property.

matej avatar Jun 03 '10 20:06 matej

I sincerely don't master Objective-C so well but adding that release I have no more this leak (tested with Instruments right on the iPhone 3Gs I have).

fabianofrancesconi avatar Jun 03 '10 23:06 fabianofrancesconi

ok sorry for the bad report .. using release would drive to a double free that's bad.. I guess there's something wrong in Instruments, then.

fabianofrancesconi avatar Jun 04 '10 11:06 fabianofrancesconi