我在swift2中有这段代码
private var RecordedDurationContext = UnsafeMutablePointer<Void>.alloc(1)如何转换为swift3
发布于 2017-03-05 23:09:49
private var RecordedDurationContext = UnsafeMutableRawPointer.alloc(1)
let a = UnsafeMutablePointer<Int>.allocate(capacity: 1)
a.pointee = 42
print("a's value: \(a.pointee)") // 42
a.deallocate(capacity: 1)https://stackoverflow.com/questions/40298491
复制相似问题