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

Unclosed SQLite Tracker Database in DatabaseTracker #3419

Open
suojae opened this issue Jan 19, 2025 · 2 comments · Fixed by #3420 · May be fixed by #3423
Open

Unclosed SQLite Tracker Database in DatabaseTracker #3419

suojae opened this issue Jan 19, 2025 · 2 comments · Fixed by #3420 · May be fixed by #3423
Labels
enhancement New feature or request

Comments

@suojae
Copy link
Contributor

suojae commented Jan 19, 2025

https://github.com/simolus3/drift/blob/develop/drift/lib/src/sqlite3/database_tracker.dart

I noticed that the DatabaseTracker class currently lacks a dispose() method to explicitly close the _db resource. This could potentially lead to resource leaks, especially in long-running applications or during Flutter hot restarts.

Would it be okay if I worked on adding a dispose() method to ensure proper cleanup of the in-memory SQLite database and any related resources?

@simolus3
Copy link
Owner

Had to revert your merge, it was causing CI failures. https://github.com/simolus3/drift/actions/runs/12856287744/job/35842802925.

Weirdly enough I don't get those locally. Could you re-open the PR again? I'll have to find some time to investigate what's happening here.

@suojae
Copy link
Contributor Author

suojae commented Jan 19, 2025

Thanks. Since the original PR cannot be reopened due to being merged, I've created a new PR with the same changes for further investigation. Here's the link to the new PR.

Please let me know if there's anything else I should look into to help resolve the CI issue.

@suojae suojae linked a pull request Jan 19, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants