Re: -[NSApp orderOut:] leaves custom sheet in -orderedWindows
Re: -[NSApp orderOut:] leaves custom sheet in -orderedWindows
- Subject: Re: -[NSApp orderOut:] leaves custom sheet in -orderedWindows
- From: Sean McBride <email@hidden>
- Date: Wed, 09 May 2012 17:20:07 -0400
- Organization: Rogue Research Inc.
On Sat, 5 May 2012 10:27:56 -0700, Jerry Krinock said:
>Mac app here, 10.7.
>
>• Show a custom sheet (window) on a document window.
>• Send it an -orderOut:
>• Send [NSApp endSheet:returnCode:]
>
>Expected Result:
>• Sheet should be completely removed from [NSApp orderedWindows].
>
>Actual Result:
>• It is moved to the end of [NSApp orderedWindows].
>
>This sheet has isReleasedWhenClosed:NO and is subclassed directly from
>NSWindow, not NSPanel. However, I don't think that matters, unless
>NSApp is watching its retainCount, which would be turning the world
>upside down.
Are you using GC?
Sounds a bit like something I saw the other day. I close a window and "shortly" after invoke [NSApp windows] and lo and behold the window I closed is still there, for some definitions of "shortly". If enough time passes, the garbage collector does some collecting and the window was collected, I guess.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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