Objective-C >> Capturing an Object Address in Memory -
how capture address of object @ point in code? example:
nsstring * astring = @"bla bla"; //what current address of astring. i.e address in memory point astring = @"la la la"; //what current address of astring.
example:
nsstring *temp = @"123"; uintptr_t ptraddress = (uintptr_t) temp; nslog(@"%@ %p %lu", temp, temp, ptraddress);
console:
2013-07-11 11:51:20.796 asd[6474:907] 123 0x17985c 1546332
it may useful - nspointerarray (ios 6+)
Comments
Post a Comment