Files
firezone/kotlin
Thomas Eizinger 1af85c77b7 fix(android): properly free event after use (#10669)
In order to properly free all memory allocated by the `Event` returned
from connlib, we need to `.destroy()` it. For this to happen
automatically, we can call the `.use` helper.

Unfortunately, there are no compile-time warnings about this so we have
to manually audit the generated code to check which objects needs
closing after use.

From what I can gather, the `Event` only needs to be closed because we
hold a reference to the `DisconnectError` inside `Disconnected`. Because
we exit after that anyway, I believe all memory is free'd regardless
already.
2025-10-23 02:07:40 +00:00
..