matrix-rust-sdk
matrix-rust-sdk copied to clipboard
Missing memory managment calls (destroy) on FFI objec?t
Looks like we have to manually release some FFIObjects

Do you find what you're looking for in the Kotlin Lifetimes Chapter of the UniFFI book?
All interfaces exposed via Kotlin expose a public API for freeing the Kotlin wrapper object in lieu of reliable finalizers. This is done by making the "base class" for all such generated objects implement the
DisposableandAutoCloseableinterfaces.As such, these wrappers all implement a
close()method, which must be explicitly called to ensure the associated Rust resources are reclaimed.
You can also ask how @ganfra or @bmarty are doing?