Merge pull request #2159 from DaPa/master
Avoid SQLite connection object leaking
This commit is contained in:
commit
df7c6e6501
1 changed files with 3 additions and 0 deletions
|
@ -44,6 +44,9 @@ abstract class GalleryDatabase : RoomDatabase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun destroyInstance() {
|
fun destroyInstance() {
|
||||||
|
if (db?.isOpen == true) {
|
||||||
|
db?.close()
|
||||||
|
}
|
||||||
db = null
|
db = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue