Skip to content

Commit 8d92d61

Browse files
committed
Clear instance after close()
1 parent a9d88fa commit 8d92d61

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

library/src/main/java/com/absinthe/rulesbundle/RuleDatabase.kt

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ abstract class RuleDatabase : RoomDatabase() {
1010

1111
abstract fun ruleDao(): RuleDao
1212

13+
override fun close() {
14+
super.close()
15+
instance = null
16+
}
17+
1318
companion object {
1419
// Singleton prevents multiple instances of database opening at the
1520
// same time.

0 commit comments

Comments
 (0)