Re: TabView / TabViewItem / Inserting Views Problem
Re: TabView / TabViewItem / Inserting Views Problem
- Subject: Re: TabView / TabViewItem / Inserting Views Problem
- From: Sam Goldman <email@hidden>
- Date: Tue, 30 Oct 2001 17:28:37 -0800
That is all well and good, but I still don't understand why my code doesn't
work.
- Sam
On 10/30/01 1:49 AM, "Ondra Cada" <email@hidden> wrote:
>
Jeff,
>
>
>>>>>> Jeff LaMarche (JLM) wrote at Mon, 29 Oct 2001 21:56:09 -0800:
>
JLM> However, at the end of the method, you are releasing tabViewItem, rather
>
JLM> than autoreleasing it. Autorelease will only release your item if the
>
JLM> retain count has reached zero, but I believe that release will kill it
>
JLM> as soon as you call it, regardless of what other objects may have issued
>
JLM> a retain.
>
JLM>
>
JLM> Is this right?
>
>
Nope. Both autorelease and release work the very same way from this point of
>
view.
>
>
Actually, autorelease is _nothing other_ than a request "be sent release at
>
the end of this event loop". (More precisely, when the current autorelease
>
pool is freed, but in newbie Cocoa applications that's the same.)
>
>
So, objects are, in fact, _ALWAYS_ released by 'release' -- autorelease only
>
schedules an "automatic" sending of it to a later time.
>
---
>
Ondra Cada
>
OCSoftware: email@hidden http://www.ocs.cz
>
2K Development: email@hidden http://www.2kdevelopment.cz
>
private email@hidden http://www.ocs.cz/oc