• 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
self = [super init], nil?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

self = [super init], nil?


  • Subject: self = [super init], nil?
  • From: "Patrick M. Rutkowski" <email@hidden>
  • Date: Fri, 7 May 2010 14:34:14 -0400

Will NSObject's init method ever really return nil?

E.g. if I sub-class NSObject, then is it worth checking for nil after
doing self = [super init]?

I know there are many classes in UIKit and Cocoa which most definitely
can return nil from their -init's, as an indication of failure. But
will this ever be the case with NSObject?

-Patrick
_______________________________________________

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: self = [super init], nil?
      • From: jeremy <email@hidden>
    • Re: self = [super init], nil?
      • From: Kyle Sluder <email@hidden>
    • Re: self = [super init], nil?
      • From: Roland King <email@hidden>
    • Re: self = [super init], nil?
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: Re: Are there any tools or techniques for detecting / debugging retain-cycles?
  • Next by Date: Re: self = [super init], nil?
  • Previous by thread: UIImage, UIColor colorWithPatternImage:, and PNG transparency
  • Next by thread: Re: self = [super init], nil?
  • Index(es):
    • Date
    • Thread