On Apr 14, 2015, at 17:01 , Juanjo Conti <jjco...@carouselapps.com> wrote: > > If I click the button too many times, fast enough, my app crash with a > EXEC_ error and if I enable zombie objects I get that it crash when one of > this two messages is been send: > > [MyDelegate respondsToSelector] or [MyDelegate retain] > > Does this smell? Any tip I should have in mind for situations like this?
It smells of a memory management error. Delegates are, in most of the modern Cocoa classes, unretained objects, and your array (with its strong references to your delegates) is what’s keeping them alive. When you remove the array element, the strong reference disappears, and your delegate can get deallocated, leading to such crashes. You should make sure you’re setting the various delegate properties in the WebView to nil before removing the array element. (It’s too late to do it after, unless you’ve taken a local strong reference to the delegate before removing.) At least, this is what it sounds like. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com