Skip to content

Conversation

@victortomilin
Copy link

@victortomilin victortomilin commented Nov 6, 2025

Android implementation has an issue with memory release.

Using the example provided in this repository, the issue can be reproduced on an Android device. Each time the video editor (the version with the Trimmer) is opened, RAM usage increases proportionally — this can be seen on the chart recorded with the profiler (tracking memory consumption). After opening it several times, the app crashes, which clearly highlight a memory overconsumption problem.

image

The issue is that Koin Dependency Injection Framework was being reinitialized on every editor launch, creating new instances of all SDK modules and leaving old contexts in memory without proper cleanup.

The chart below is representing how memory consumption looks like after this fix.

image

This fix is adding a check to detect if Koin is already started. Now the context is created once and reused for all subsequent editor sessions, eliminating redundant SDK module creation.

This solution isn’t perfect, but it demonstrates that the problem exists. Ideally, the video editor should be unloaded from memory at least some time after it’s closed.

@victortomilin victortomilin deleted the fix/memory-leaking branch November 6, 2025 22:49
@victortomilin victortomilin restored the fix/memory-leaking branch November 6, 2025 22:51
@victortomilin victortomilin reopened this Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant