精读 预计 1 分钟
Gossamer
摘要
正文摘录明确指出 Gossamer 的内存模型:采用确定性引用计数,严密参考 Swift 的 ARC,额外添加自动循环收集机制;同时引入 arena {} 区域作为内存回收单元,随着出作用域自动回收。明确声明不采用借用检查器、不支持生命周期语法、不使用追踪式垃圾回收器。
荐读理由
Gossamer 的确定性引用计数精确仿照 Swift ARC 实现,还自动加入循环收集与 arena 作用域回收,无需借用检查器和生命周期追踪就能立即落地
原文
A Swift-like memory model
Deterministic reference counting - closely modeled on Swift's ARC, with automatic cycle collection added - plus arena { } regions reclaim memory as it goes out of scope. No borrow checker, no lifetimes, no tracing collector.
这条对你有帮助吗?