• 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: About iVars declaration and property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About iVars declaration and property


  • Subject: Re: About iVars declaration and property
  • From: Charles Srstka <email@hidden>
  • Date: Sun, 13 Nov 2011 01:42:07 -0600

On Nov 13, 2011, at 1:16 AM, ico wrote:

> I am surprise that I just know we do not need to declare instance variables
> explicitly when we declare the property and use @synthesize.
>
> That is we do not need a instance variable to be declared that is
> corresponds to the property declaration.
>
>
>
> look at this blog:
> http://cocoawithlove.com/2010/03/dynamic-ivars-solving-fragile-base.html
>
>
>
> However, I just wonder, is it really true that there is no ANY different
> between explicitly declaring iVars and not delaring it?
>
> If so, is it a better approach that just declare the property and let
> @synthesize to generate the iVars itself.
>
>
>
> Any more explaination and clarify will be appreciated.

Only difference is that you have to explicitly declare the ivar to be compatible with the 32-bit runtime.

If you’re 64-bit only (or if you require Lion or better), there’s no real reason to explicitly declare the ivars these days.

Charles_______________________________________________

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

  • Follow-Ups:
    • Re: About iVars declaration and property
      • From: Don Quixote de la Mancha <email@hidden>
References: 
 >About iVars declaration and property (From: ico <email@hidden>)

  • Prev by Date: About iVars declaration and property
  • Next by Date: nstextview and inspector bar
  • Previous by thread: About iVars declaration and property
  • Next by thread: Re: About iVars declaration and property
  • Index(es):
    • Date
    • Thread