Is there anyway to simulate the [NSString stringWithFormat:@\"%p\", myVar], from Objective-C, in the new Swift language?
[NSString stringWithFormat:@\"%p\", myVar]
For example:
le
Note: This is for reference types.
print(Unmanaged.passUnretained(someVar).toOpaque())
Prints the memory address of someVar. (thanks to @Ying)
print(Unmanaged.passUnretained(someVar as AnyObject).toOpaque())
Prints the memory address of someVar.