• 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: checking if an object's instance exists.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: checking if an object's instance exists.


  • Subject: Re: checking if an object's instance exists.
  • From: Chris Ridd <email@hidden>
  • Date: Sat, 05 Feb 2005 08:35:36 +0000

On 5/2/05 6:11 am, Kevin Ballard <email@hidden> wrote:

> You should also set object1 to nil in your init method to be safe
> (AFAIK there's no docs saying ivars are zeroed when allocated, so I
> wouldn't assume it)

Actually the runtime /is/ guaranteed to set all ivars to 0 (apart from the
isa ivar) in the alloc methods.

<http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Runtim
eOverview/chapter_4_section_2.html#//apple_ref/doc/uid/20001425/TPXREF115>

aka "Allocating and Initializing Objects" in the "Memory Management" chapter
of the "Objective-C Programming Language" book.

Cheers,

Chris


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: checking if an object's instance exists. (From: Kevin Ballard <email@hidden>)

  • Prev by Date: Re: Using resources from Cocoa app
  • Next by Date: Re: NSToolbar(item) quirk
  • Previous by thread: Re: checking if an object's instance exists.
  • Next by thread: Strange behavior when editing NSBrowserCell
  • Index(es):
    • Date
    • Thread