Investigate use of Global instead of Persistent
未关闭
还没有人认领这个 Issue。
- 主要语言
- C++
- 星标
- 74
- 派生
- 9
- PR 合并指标
- 30 天内没有已合并 PR
描述
Currently we only use `Nan::Persistent` which requires that we call `Reset()` prior to the objects destruction or the object will never be garbage collected. `Nan::Global` is an alternative that provides automatically calls reset at the time of destruction of the hander.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先定位 Nan::Persistent 的使用位置,并检查每个对象是如何销毁的。将这些生命周期与 Nan::Global 的自动 reset 行为进行比较。当确定这些使用位置是否可以安全切换而不留下未回收的对象,并记录或实现由此产生的更改后,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- node.js
- 领域
- backend-api-design
- Issue 类型
- 重构
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100