如何知道对象地址是否为0x0?

Rad*_*lav 3 objective-c ios

我想检查我的对象地址是否为0x0.如何在目标c中做到这一点?

Ind*_*ore 5

只需将参考文献作为

if (obj == nil)
Run Code Online (Sandbox Code Playgroud)

要么

if (obj == NULL)
Run Code Online (Sandbox Code Playgroud)

要么

if (obj == 0)
Run Code Online (Sandbox Code Playgroud)

要么

if (!obj)
Run Code Online (Sandbox Code Playgroud)

你可以使用它们中的任何一个它们都是相同的.