Re: NSView subclass never gets dealloced?
Re: NSView subclass never gets dealloced?
- Subject: Re: NSView subclass never gets dealloced?
- From: Brock Brandenberg <email@hidden>
- Date: Fri, 29 Mar 2002 09:47:11 -0600
NSView subclass never gets dealloced?
I'm seeing the same thing on an NSView subclass and can't figure out
what's wrong. If the window is set to releaase on close, the dealloc
gets called, but this is not the right thing to do if using the default
window controller. You'll get a crash if selecting a menu right
afterwards. I think the docs are incorrect too, in that they mention the
default behavior for an NSWindow is to release on close, yet IB sets the
default to NOT release on close. Again, I'm assuming that it has
something to do with the default window controller.
Pragmatically, if it doesn't get called when the app terminates, then
piscine or not, it won't really matter as the OS will clear up the
memory for you. If this is happening for a number of windows, then it's
more of a problem.
While it's not the proper place to do so, if you had any files open for
debugging or such and were relying on the destructor to clean up, it
would not. Memory would be reclaimed by the system, but file closing is
one of those undefined behaviors. They probably get closed, but who
knows what subsequent EOF errors might happen on reading them.
Anyone have any better info than the Apple API references?
And is this list moderated by anyone from Apple? The lack of sample code
for Cocoa is pathetic, as is the lack of examples of proper application
of the APIs? Whose working on these docs?
Brock Brandenberg
----- industrial design @ bergdesign ------
web site: www.bergdesign.com
email: email@hidden
--------------------------------------------
_______________________________________________
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.