Re: Fwd: windowcontroller neccessary?
Re: Fwd: windowcontroller neccessary?
- Subject: Re: Fwd: windowcontroller neccessary?
- From: matt neuburg <email@hidden>
- Date: Tue, 14 Jan 2003 11:10:08 -0800
On Tue, 14 Jan 2003 00:15:03 -0800, James DiPalma <email@hidden> said:
>
>
> From: daniel oberhoff <email@hidden>
>
>
>
> ok, thanks! i think things are clearer now. but what do you mean with
>
> leaking? wont the principal NSApplication deallocate recources used by
>
> the main nib-file (or similarly wont the NSDocument subclass
>
> deallocate the documents nib-files resources)?
>
>
There was some discussion months ago about not worrying about
>
NSApplication deallocing resources; when your app quits, all its
>
resources should clean up anyway.
But quittin'-time is not the only time that the file's owner might be deallocated. And if the nib is not cleaned up at that moment, that's a leak (you're now using (much) more memory than you should be, and you've got a lot of nib objects still loaded but with no way to talk to them). My original point was that if the file's owner is an NSWindowController then all of that is handled correctly, automatically. To me, that's reason enough to make every file's owner an NSWindowController (except MainMenu.nib, of course). m.
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
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.