• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problems with runModalForWindow, looking for alternatives
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Problems with runModalForWindow, looking for alternatives
      • From: Vojtěch Meluzín <email@hidden>
References: 
 >Re: Problems with runModalForWindow, looking for alternatives (From: Vojtěch Meluzín <email@hidden>)

  • Prev by Date: Re: Problems with runModalForWindow, looking for alternatives
  • Next by Date: Re: Custom NSView binding
  • Previous by thread: Re: Problems with runModalForWindow, looking for alternatives
  • Next by thread: Re: Problems with runModalForWindow, looking for alternatives
  • Index(es):
    • Date
    • Thread