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

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -