• 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: Newbie Q : Not-so-simple encoding&decoding example
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie Q : Not-so-simple encoding&decoding example


  • Subject: Re: Newbie Q : Not-so-simple encoding&decoding example
  • From: Chris Suter <email@hidden>
  • Date: Sat, 27 May 2006 10:00:07 +1000

In Class1.m

-- (id)initWithCoder:(NSCoder *)coder
{
   if (self = [super init]) {
            [array1 release];
           [array2 release];

These are pointless releases. You just called -[super init]. All of your instance variables are guaranteed to be nil. There is no point in sending release messages to object pointer you know are nil.

Out of interest what guarantees they're nil? I thought it was alloc that guarantees your data is zeroed, not a call to init.




_______________________________________________
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


  • Follow-Ups:
    • Re: Newbie Q : Not-so-simple encoding&decoding example
      • From: "Shawn Erickson" <email@hidden>
References: 
 >Re: Newbie Q : Not-so-simple encoding&decoding example (From: James Bucanek <email@hidden>)

  • Prev by Date: Re: ssl.h linking error
  • Next by Date: Re: Newbie Q : Not-so-simple encoding&decoding example
  • Previous by thread: Re: Newbie Q : Not-so-simple encoding&decoding example
  • Next by thread: Re: Newbie Q : Not-so-simple encoding&decoding example
  • Index(es):
    • Date
    • Thread