How to safely delete a WebView delegate object?
How to safely delete a WebView delegate object?
- Subject: How to safely delete a WebView delegate object?
- From: Juanjo Conti <email@hidden>
- Date: Tue, 14 Apr 2015 21:01:34 -0300
Hi there!
This is my scenario:
I have a Swift Array containing Dictionaries where the keys are the strings
"delegate" and "webView". The corresponding values are WebView instances
and a delegate object per webView. Each WebView has all its *delegate
properties pointing to the same delegate object but a delegate object is
not pointed by 2 different WebViews.
I have a delete button that does something like:
myArrayremoveAtIndex(lastIndex)
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?
--
Juanjo Conti <jjconti <http://goog_2023646312>@carouselapps.com
<email@hidden>>
Software Engineer - Carousel Apps <https://carouselapps.com>
--
Carousel Apps Limited, registered in England & Wales with registered number
7689440 and registered office Unit 2 Artbrand Studios, 7 Leathermarket
Street, London SE1 3HN. Any communication sent by or on behalf of Carousel
App Ltd or any of its subsidiary, holding or affiliated companies or
entities (together "Watu") is confidential and may be privileged or
otherwise protected. If you receive it in error please inform us and then
delete it from your system. You should not copy it or disclose its contents
to anyone. Messages sent to and from Watu may be monitored to ensure
compliance with our internal policies and to protect our business. Emails
are not secure and cannot be guaranteed to be error free. Anyone who
communicates with us by email is taken to accept these risks.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden