Swift4.2 打印对象内存地址

var a = 1
print(Unmanaged.passUnretained(a as AnyObject).toOpaque())

推荐阅读更多精彩内容