Anthony Eid 6f844cf1a1 Fix get_descriptors memory leak (#746)
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.
2026-01-15 21:38:44 +00:00
2025-07-13 05:38:26 +00:00
2024-08-12 01:28:59 +00:00
2013-04-04 19:01:35 -07:00
2013-04-03 18:18:52 -07:00
2013-04-03 18:18:52 -07:00

core-foundation-rs

Build Status

Compatibility

Targets macOS 10.7 by default.

To enable features added in macOS 10.8, set Cargo feature mac_os_10_8_features. To have both 10.8 features and 10.7 compatibility, also set mac_os_10_7_support. Setting both requires weak linkage, which is a nightly-only feature as of Rust 1.19.

For more experimental but more complete, generated bindings take a look at https://github.com/michaelwu/RustKit. Other alternatives are https://github.com/nvzqz/fruity and https://gitlab.com/objrs/objrs

Contributing

If you wish to start contributing or even make a one-off change, simply submit a pull request with the code or documentation change and we'll go from there.

S
Description
No description provided
Readme 2.5 MiB
Languages
Rust 100%