Skip to content

Commit 0ca45d7

Browse files
authored
fix: memory leak visualizer stop android (#831)
Memory leak on Android has been fixed
1 parent c06a4c8 commit 0ca45d7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

android/src/main/kotlin/io/livekit/plugin/LiveKitPlugin.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ class LiveKitPlugin: FlutterPlugin, MethodCallHandler {
9292
result.error("INVALID_ARGUMENT", "trackId and visualizerId is required", null)
9393
return
9494
}
95+
processors.forEach { (k, visualizer) ->
96+
if(k == visualizerId) {
97+
visualizer.stop()
98+
}
99+
}
95100
processors.entries.removeAll { (k, v) -> k == visualizerId }
96101
result.success(null)
97102
}

0 commit comments

Comments
 (0)