Release window on close not releasing controller?
Release window on close not releasing controller?
- Subject: Release window on close not releasing controller?
- From: Rudi Sherry <email@hidden>
- Date: Thu, 19 Oct 2006 09:39:53 -0700
I have a v ery small test app, started from Xcode's New Project
"Cocoa Application".
In Interface Builder I made sure to mark the existing single window
"Release on close".
I added a custom controller for that window.
I would like the custom controller to get deallocated when that
window is closed, but I find I have to add a notification observer on
windowDid/WillClose: and call [ controller autorelease ] in order to
make that happen.
I tried adding [ self autorelease ] to the custom controller's
awakeFromNib mesavge and that caused it to be released when the
loadNib message clears its autorelease pool, and all heck broke loose.
Is there a way to make the custom controller (from the nib)
automatically be released when the window is released, without
specifically adding code?
Thanks,
Rudi
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden