Re: Help : Releasing NSWindowController object ?
Re: Help : Releasing NSWindowController object ?
- Subject: Re: Help : Releasing NSWindowController object ?
- From: Gareth White <email@hidden>
- Date: Tue, 4 Jun 2002 20:14:18 +0800
At 2:22 PM +0800 4/6/2002, K.K.Chan wrote:
>
I just want to know, is it safe to release NSWindowController subclass
>
object ?
Yes, but only if your window controller isn't associated with a document.
Your example looks fine to me.
However, when there's only ever going to be a single instance of your
window (e.g. it's a prefs window or about box), you don't actually *need*
to release it when it closes. You can just hide the window instead, then
show it again when you next need it. This saves a bit of time (because the
nib file doesn't have to be read in again) but wastes some memory (because
the window is kept around regardless of whether or not it's ever shown
again).
Hope that helps,
Gareth
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.