Closed nikclayton closed 2 years ago
I'm migrating Open Sudoku development from GitHub to GitLab. To make the migration as clean as possible I'm going to close this issue. If you are still interested (or if it is still relevant), please open it again in GitLab from July 26.
Thank you very much for your understanding.
The current code logs warnings about resource leaks, in particular database leaks.
E.g., in
the
db
handle is leaked becausedb.close()
is not called.The two lines marked XXX can be replaced with:
which will use try-with-resources and close
db
when it goes out of scope too. That solves some of the problems, but I've noticed thatgetFolderList
leaks as well:I suspect the "correct" fix is write the database handling in terms of https://developer.android.com/reference/androidx/lifecycle/ViewModel and https://developer.android.com/reference/androidx/lifecycle/LiveData, which I think are supposed to resolve issues like this.