• 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
Objective-C basics - (Why NSNumber conforms to NSCopying protocol)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Objective-C basics - (Why NSNumber conforms to NSCopying protocol)


  • Subject: Objective-C basics - (Why NSNumber conforms to NSCopying protocol)
  • From: Sasikumar JP <email@hidden>
  • Date: Thu, 11 Aug 2016 12:02:31 +0530

Hi,

   This may be very basic question. I am curious to know the details.

what was the reason NSNumber conforms to NSCopying protocol.

NSNumber is immutable class, Making a copy of NSNumber object returns the
same reference.

Is there any case where NSNumber returns the new object? if not, then what
is the purpose of conformance to NSCopying protocol.

Regards
Sasikumar JP
_______________________________________________

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: Objective-C basics - (Why NSNumber conforms to NSCopying protocol)
      • From: Steve Sisak <email@hidden>
    • Re: Objective-C basics - (Why NSNumber conforms to NSCopying protocol)
      • From: Quincey Morris <email@hidden>
    • Re: Objective-C basics - (Why NSNumber conforms to NSCopying protocol)
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: NSImage drawInRect deadlock
  • Next by Date: Re: Objective-C basics - (Why NSNumber conforms to NSCopying protocol)
  • Previous by thread: Re: Cocoa File Close Notification
  • Next by thread: Re: Objective-C basics - (Why NSNumber conforms to NSCopying protocol)
  • Index(es):
    • Date
    • Thread