Skip to content

Commit ed16666

Browse files
authored
Merge pull request #25 from qhy040404/main
Clear instance after close()
2 parents a9d88fa + 8d92d61 commit ed16666

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)