9 releases (3 stable)
1.2.0 | Apr 19, 2023 |
---|---|
1.1.1 | Mar 22, 2023 |
1.1.0 | Sep 22, 2022 |
1.0.0-alpha.5 | May 25, 2022 |
1.0.0-alpha.2 | Jan 15, 2022 |
#665 in Memory management
190 downloads per month
Used in 19 crates
(12 directly)
12KB
190 lines
audio-garbage-collector
Batteries included solution to using reference counted values on the audio-thread.
Wraps basedrop
so that smart pointers are dropped on a background thread. Exposes a default
global GC thread and helpers to create pointers attached to it.
Collection frequency
Collection is based on polling the queue. If references are created and dropped very frequently this will not be adequate.
License: MIT
lib.rs
:
Batteries included solution to using reference counted values on the audio-thread.
Wraps basedrop
so that smart pointers are dropped on a background thread. Exposes a default
global GC thread and helpers to create pointers attached to it.
Collection frequency
Collection is based on polling the queue every 100ms by default.
If references are created and dropped very frequently this strategy is not adequate. This also adds some small overhead.
Dependencies
~0.3–2.4MB
~47K SLoC