CodeEditApp / CodeEditApp/CodeEdit

🐞 Possible memory leak in CurrentUser struct

未关闭
#2,133 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Swift
星标
23k
派生
1.2k
PR 合并指标
30 天内没有已合并 PR

描述

### Description

In `CurrentUser.getCurrentUser()`, an `UnsafeMutablePointer` is allocated but never explicitly freed. When I added a `deallocate()` call in a defer block, the process crashed saying the pointer was freed but never allocated. I am uncertain if there is a memory leak here.

### To Reproduce

1. Open a workspace, thus creating a terminal, which calls `CurrentUser.getCurrentUser()`.

### Expected Behavior

No memory leak, but, again, I am uncertain if there is actually a leak here.

### Version Information

CodeEdit: 0.3.6-dev (37)
macOS: 15.6.1
Xcode: 26.0

### Additional Context

_No response_

### Screenshots

_No response_

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。