Fix get_descriptors memory leak - #746
Conversation
That would make sense. To be honest, I didn't check the file history. I just figured "bugs happen" and I should make a PR to fix it. The leak isn't the biggest deal for Zed since we cache the results, but I would still really appreciate it if this got merged. |
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
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
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
|
@madsmtm Is there anything else I can do to get this PR merged? Or should I just wait until a reviewer has time? |
|
CI was fixed in #747. This might need another attempt. |
|
@Anthony-Eid Can you rebase your changes and push to this branch or give maintainers access to modify this pull request? |
This function incorrectly assumed that `CTFontCollectionCreateMatchingFontDescriptors` doesn't follow the *Create* rule which is false. From Apple's docs > A retained reference to an array of normalized font descriptors matching the collection definition. https://leopard-adc.pepas.com/documentation/Carbon/Reference/CTFontCollectionRef/Reference/reference.html#//apple_ref/c/func/CTFontCollectionCreateMatchingFontDescriptors I also confirmed using instruments that this was causing a memory leak in Zed.
Head branch was pushed to by a user without write access
33915cd to
6b17d00
Compare
done, please let me know if you need me to do anything else |
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
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
This function incorrectly assumed that
CTFontCollectionCreateMatchingFontDescriptorsdoesn't follow the Create rule which is false.From Apple's docs
I also confirmed using instruments that this was causing a memory leak in Zed.