Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TabView / TabViewItem / Inserting Views Problem



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


References: 
 >Re: TabView / TabViewItem / Inserting Views Problem (From: Ondra Cada <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.