On Sep 27, 2008, at 4:44 PM, Uli Kusterer wrote:


That said, I fully agree on one partial point you raised: 'Release when closed' is dangerous and complicates matters. It should be off by default, and it's very likely that nobody would miss it. That said, I don't know what it was originally introduced for. Any old NeXTies here who know?


Well, I'm not an old NeXTie, but I use this when I make a "throw away" window programmatically. Something like the About panel, say. Instead of setting up a delegate and have it autorelease the window on the -windowShouldClose: method, I just set it up with release when closed and I know when the window is closed it gets released.

I have no idea why it's an option in a nib file, though. Perhaps someone just wanted to be thorough in giving you the window's options?

Does the window really get deallocated when using this option? I haven't really looked, but wouldn't the nib's owner still have a reference to it as part of its top level objects?



--------------------------------------
Darkshadow
(aka Michael Nickerson)
http://www.nightproductions.net


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to