Quantcast
Channel: Debugging – Michael Tsai
Viewing all articles
Browse latest Browse all 172

NSAtom, the True Object

$
0
0

Brian Webster:

In our case, if our method is returning a YES value, that will end up with a full value of 0x0000000000000001. If you try interpreting this value as an object, the runtime will think it is a tagged pointer, since the bottom bit is 1. OK then, so what kind of object is this exactly?

[…]

Ah, so it looks like, whether by design or by accident, no matter what message you send to NSAtom, it returns a value of 1.


Viewing all articles
Browse latest Browse all 172

Trending Articles