Re: showing window causes EXC_BAD_ACCESS
Re: showing window causes EXC_BAD_ACCESS
- Subject: Re: showing window causes EXC_BAD_ACCESS
- From: Michael Nickerson <email@hidden>
- Date: Sat, 27 Sep 2008 22:28:02 -0400
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 (email@hidden)
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:
This email sent to email@hidden