Re: showing window causes EXC_BAD_ACCESS
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