扫码关注官方订阅号
认证0级讲师
Swift 3.0 (2.x没有试过, 但是思路应该是一样的)
import Foundation // alloc let buff = UnsafeMutablePointer<CChar>.alloc(1) // 赋值 buff.memory = CChar(integerLiteral: 8) // 计算 print(buff.memory + 2) // 销毁 buff.destroy() // 释放 buff.dealloc(1)
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
Swift 3.0 (2.x没有试过, 但是思路应该是一样的)