• 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: Using CFHash to tell if a CFTypeRef has changed?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using CFHash to tell if a CFTypeRef has changed?


  • Subject: Re: Using CFHash to tell if a CFTypeRef has changed?
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 11 Jan 2016 09:57:51 -0800

> On Jan 11, 2016, at 9:48 AM, Dave <email@hidden> wrote:
>
> I have an object that is a wrapper around a CFTypeRef. I’d like to be able to check if this object has changed, can I use the safely use the CFHash() function to do this.

No. If the object has changed, its hash isn’t guaranteed to change; there exist hash collisions where two different values have the same hash. (This is inevitable since there are only 2^32 hash values, but a nearly infinite number of different strings, arrays, etc.)

—Jens
_______________________________________________

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: Using CFHash to tell if a CFTypeRef has changed?
      • From: Jens Alfke <email@hidden>
References: 
 >Using CFHash to tell if a CFTypeRef has changed? (From: Dave <email@hidden>)

  • Prev by Date: Using CFHash to tell if a CFTypeRef has changed?
  • Next by Date: Re: Using CFHash to tell if a CFTypeRef has changed?
  • Previous by thread: Using CFHash to tell if a CFTypeRef has changed?
  • Next by thread: Re: Using CFHash to tell if a CFTypeRef has changed?
  • Index(es):
    • Date
    • Thread