Is there any better way to get the memory address than this?
NSLog(@"%p", anObject);
I would rather get the plain long value.
Is there any better way to get the memory address than this?
NSLog(@"%p", anObject);
I would rather get the plain long value.
Copyright © 2021 Jogjafile Inc.
Also you can caste some
Type*tointptr_t, and look at this address in decimal representation:To represent pointer address as integer in C exists 2 types:
intptr_tanduintptr_t.intptr_tis defined as__darwin_intptr_t.and
__darwin_intptr_tdefined aslong:uintptr_tdefined asunsigned long:I think what for
uintptr_tI should use%luand forintptr_tI should use%li: