> I require an pointer to the value represented by an NSNumber. > ... > I am using NSNumber instances in collections as keys.
i may not fully understand your question, but can you not just use NSValue valueWithPointer as your collection keys? or, if a number at all, the number matching the pointer representation: [NSNumber numberWithLong:*(ptrdiff_t*)&pointer] or a string in a similar manner: [NSString stringWithFormat:@"%p", pointer]; in my experience resorting to tricks of objc_getAssociatedObject is asking for trouble (e.g. the associated object is not released with zombies). Mike _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com