Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native Memory Leak on Android #31

Open
JorbeTracy opened this issue Jan 14, 2025 · 1 comment
Open

Native Memory Leak on Android #31

JorbeTracy opened this issue Jan 14, 2025 · 1 comment

Comments

@JorbeTracy
Copy link

Thank you for this helpful project :), I encountered some issues while using it: I used SileroVad for real-time voice activity detection and noticed that the native memory usage kept increasing. I found that some resources might not be released properly:

  1. After using getInputTensors to obtain OnnxTensor, the close method was not called to release the resources.
  2. The result of session.run was not closed after usage.
  3. When using getModel to access the assets stream, the stream was not explicitly closed. It might be better to cache the byte data instead of loading the model repeatedly.
@gkonovalov
Copy link
Owner

Feel free to create pull request with patch against dev repo and I will merge it.

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

No branches or pull requests

2 participants