Skip to content

Conversation

@Anthony-Eid
Copy link
Contributor

@Anthony-Eid Anthony-Eid commented Dec 16, 2025

Closes: #125

I would've used CFRelease, but that isn't a public function. CFRetained calls CFRelease under the hood when it's dropped, so this is the next best thing.

I noticed this leak when running instruments on Zed. Please let me know if I missed anything.

I would've used CFRelease, but that isn't a public function. CFRetained
calls CFRelease under the hood when it's dropped, so this is the next
best thing.

I noticed this leak when running instruments on Zed, please let me know
if I missed anything.
Anthony-Eid added a commit to zed-industries/zed that referenced this pull request Dec 17, 2025
The below memory leaks were caused by failing to release reference
counted resources. I confirmed using instruments that my changes stopped
the leaks from occurring.

- System prompts 
- Screen capturing 
- loading font families

There were also two memory leaks I found from some of our dependencies
that I made PRs to fix
- RustAudio/coreaudio-rs#147
- servo/core-foundation-rs#746

Release Notes:

- N/A
HactarCE pushed a commit to zed-industries/zed that referenced this pull request Dec 17, 2025
The below memory leaks were caused by failing to release reference
counted resources. I confirmed using instruments that my changes stopped
the leaks from occurring.

- System prompts 
- Screen capturing 
- loading font families

There were also two memory leaks I found from some of our dependencies
that I made PRs to fix
- RustAudio/coreaudio-rs#147
- servo/core-foundation-rs#746

Release Notes:

- N/A
Copy link
Member

@simlay simlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I swear I saw this on the cpal repo and glossed over it (as I only maintain coreaudio-rs).

@Anthony-Eid
Copy link
Contributor Author

What's the cpal repo? I'm asking to know if I should make a PR there

@simlay
Copy link
Member

simlay commented Dec 18, 2025

What's the cpal repo? I'm asking to know if I should make a PR there

Oh, `cpal. It's just the most common dependent of coreaudio-rs. Looking at the call, it should be fixed when this is released which will get published when I merge #145 (but I'm gonna merge this and the tvOS PR first).

@Anthony-Eid
Copy link
Contributor Author

Awesome! Thanks for responding to this PR so fast

@simlay simlay merged commit 38907cb into RustAudio:master Dec 18, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

memory leak when getting device name

2 participants