Can I somehow encourage the deallocation of a dismissed view controller?
Can I somehow encourage the deallocation of a dismissed view controller?
- Subject: Can I somehow encourage the deallocation of a dismissed view controller?
- From: G S <email@hidden>
- Date: Wed, 08 Feb 2012 18:26:31 -0800
>
> > It's just a crash in the control's dealloc method:
> > 0x0019f56e -[ThumbStripView dealloc]
>
> But what is the crash? EXC_BAD_ACCESS?
>
Don't know. The above is all that appears in the crash log, and it's so
hard to reproduce that I've never seen it while running under the debugger.
If so, I wonder whether this is just a symptom of an elusive
> over-release elsewhere in your code. Does anything show up in Clang?
> Have you tried running with zombies enabled?
>
Well, at the time the owning view is deallocated (because yes, it is
deallocated; I've stepped through it), the control isn't. And although I
know retainCount isn't reliable, it's 3 at the point of the parent view's
deallocation. So I don't see how over-releasing could be a problem, since
the only entity that would even attempt to release it in my code has been
blown away.
I've never used Clang. I ran the app in Instruments looking for leaks and
with zombies enabled. No zombies found, and I've fixed the few leaks that
existed.
I had read that Apple doc on IBOutlet management, thanks. Looking at it
again, however, I see that I overlooked this:
"To ensure that you properly relinquish ownership of outlets, in your
custom view controller class you can implement viewDidUnload to invoke your
accessor methods to set outlets to nil."
I'm going to give that a try.
_______________________________________________
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