• 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: Memory management question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory management question


  • Subject: Re: Memory management question
  • From: Alastair Houghton <email@hidden>
  • Date: Wed, 24 Mar 2004 23:12:27 +0000

On 24 Mar 2004, at 22:36, Ondra Cada wrote:

> Randall,
>
> On Wednesday, Mar 24, 2004, at 23:02 Europe/Prague, Randall Meadows
> wrote:
>
>>> [[someObject retain] release];
>>
>> When an object gets deallocated, is it then set to nil?
>
> Never. You do that yourself when appropriate.
>
>> In the above sample, is then "someObject" == nil?
>
> Besides, in the above sample, the object is not, repeat *NOT*
> deallocated. Quite the contrary: its lifespan is (potentially)
> expanded so that it exists *at least* till the current autorelease
> pool is freed.

Indeed. As I already posted (although it hasn't got there yet), I was
mistaken. I'd be surprised if the lifespan were expanded unless you
did another -autorelease though.

Kind regards,

Alastair.

--
http://www.alastairs-place.net

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: Memory management question (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: SQLite Database
  • Next by Date: Re: Memory management question
  • Previous by thread: Re: Memory management question
  • Next by thread: Re: Memory management question
  • Index(es):
    • Date
    • Thread