• 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: showing window causes EXC_BAD_ACCESS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: showing window causes EXC_BAD_ACCESS


  • Subject: Re: showing window causes EXC_BAD_ACCESS
  • From: "Michael Ash" <email@hidden>
  • Date: Sat, 27 Sep 2008 16:13:21 -0400

On Sat, Sep 27, 2008 at 2:39 PM, Uli Kusterer
<email@hidden> wrote:
>  Also, there are cases where someone else is going to retain a window
> anyway. Closing a window will simply call -release, if someone else retained
> it, the object won't go away.

But suddenly you're back to having to think about the global picture
of who owns objects, which is what Cocoa's memory management system is
supposed to avoid.

Retains and releases should be balanced. This doesn't just means that
they should ultimately be equal in number, it also means that the same
entity should be doing both. "Release when closed" breaks the
fundamental memory management rules and, as a consequence, makes it
much more complicated to think about how the program works.

Mike
_______________________________________________

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: showing window causes EXC_BAD_ACCESS
      • From: Uli Kusterer <email@hidden>
References: 
 >Re: showing window causes EXC_BAD_ACCESS (From: Charles Steinman <email@hidden>)
 >Re: showing window causes EXC_BAD_ACCESS (From: Daniel Child <email@hidden>)
 >Re: showing window causes EXC_BAD_ACCESS (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: problems in runModal in NSOpenPanel used with defaults
  • Next by Date: Re: design pattern for data acquisition in background thread?
  • Previous by thread: Re: showing window causes EXC_BAD_ACCESS
  • Next by thread: Re: showing window causes EXC_BAD_ACCESS
  • Index(es):
    • Date
    • Thread