mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
This removes the dc_context_unref function from the Rust API which was just an alias for dc_close. It still exists on the C API where it makes sure to free the memory. It also implements Drop for the context which just calls dc_close to make sure all the memory is freed. Since you can call dc_close as many times as you like this ensures that at the Rust level you can't Drop the struct without releasing the memory. Finally since memory is now freed by dropping the struct this removes the #[repr(C)] for the struct. This struct is fully opaque to the C API.