• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Release window on close not releasing controller?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: -[NSMenuItem setKeyEquivalent] not working for some keys
  • Next by Date: Re: NSTableView who retains NSTableColumns?
  • Previous by thread: Re: SWF support on NSMovie
  • Next by thread: Is NSNotification from NSStepper possible
  • Index(es):
    • Date
    • Thread