Re: Problems with runModalForWindow, looking for alternatives
Re: Problems with runModalForWindow, looking for alternatives
- Subject: Re: Problems with runModalForWindow, looking for alternatives
- From: "Gary L. Wade" <email@hidden>
- Date: Tue, 01 Nov 2011 12:10:30 -0700
- Thread-topic: Problems with runModalForWindow, looking for alternatives
Did you try calling stopModal or one of its variants before releasing it?
And, did you release the window rather than dealloc'ing it? Try those to
get rid of your crash.
--
Gary L. Wade
http://www.garywade.com/
On 11/01/2011 11:41 AM, "Vojtěch Meluzín" <email@hidden>
wrote:
>But the retainCount is needed for successful release of the window, right?
>I allocate the window and then deallocate it when I'm finished with it.
>But
>runModalForWindow increases retainCount to 2, so when I release it, it's
>actually not destroyed and causes a crash afterward, because for some
>crazy
>reason the OS tries to repaint the view in it, despite the window is
>already closed...
_______________________________________________
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