初始化
var a = UnsafeMutablePointer<String>.allocate(capacity: 0)
赋值
a.pointee = "hello world!"
使用
func testFunc(_ aa: inout UnsafeMutablePointer<String>){
print(aa.move())
aa.pointee = "hello swift!"
}
var a = UnsafeMutablePointer<String>.allocate(capacity: 0)
a.pointee = "hello world!"
testFunc(&a)
print(a.move())