From d1e7ca876281b786a07c5c0f7977620720de1351 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 11 Jan 2024 15:53:01 -0800 Subject: [PATCH] Temporarily avoid releasing livekit RemoteAudioTracks on drop (#4030) This release call was added during the conversion to gpui2. I think it is probably valid, but want to remove it on the off chance that it is causing the crash that we're seeing in the `livekit.multicast` thread when leaving a room. Most likely, this is not going to fix anything, and is just introducing a small memory leak, but it is a step back to how the app worked with gpui 1. --- crates/live_kit_client/src/prod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/live_kit_client/src/prod.rs b/crates/live_kit_client/src/prod.rs index 0827c0cbb41092f7643891c71c8b8c1f279a0860..3082c9b5338d7449b00a86fe60287213acd1e79d 100644 --- a/crates/live_kit_client/src/prod.rs +++ b/crates/live_kit_client/src/prod.rs @@ -864,7 +864,10 @@ impl RemoteAudioTrack { impl Drop for RemoteAudioTrack { fn drop(&mut self) { - unsafe { CFRelease(self.native_track.0) } + // todo: uncomment this `CFRelease`, unless we find that it was causing + // the crash in the `livekit.multicast` thread. + // + // unsafe { CFRelease(self.native_track.0) } } }