Re: Can I somehow encourage the deallocation of a dismissed view controller?
Re: Can I somehow encourage the deallocation of a dismissed view controller?
- Subject: Re: Can I somehow encourage the deallocation of a dismissed view controller?
- From: G S <email@hidden>
- Date: Wed, 08 Feb 2012 19:45:43 -0800
>
> AHHHHH.
>
> There you go. You gotta realize that if you release an object more than
> once, that WILL end up crashing, though not necessarily when you expect.
>
Hm. I didn't say this (because I thought it was obvious) , but I released
it three times in succession *as an experiment to force the deallocation*.
Anyway, to see what was retaining this control, I overrode its retain and
release. Here are the sources of the calls to retain:
UIRuntimeConnection initWithCoder
CFRetain
UIView _addSubview
UIRuntimeConnection initWithCoder
CFRetain
_NSSetObjectValueForKeyInIvar
CALayer layoutSublayers
And after the view is dismissed, here are the things that call release:
CFRelease
UIRuntimeConnection release
UIRuntimeConnection dealloc
CFRelease
UiNibDecoder finishDecoding
CALayer layoutSublayers
In the end, there's one fewer call to release. Don't know what that
proves. I don't see a balancing release call for the UIView _addSubview.
I don't add the control as a subview to anything, so I assume this is done
by the deserialization from the XIB.
_______________________________________________
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