when closing db, close all pending statements also
Change-Id: Ia543933e0cd70852c4e60623de698bb51b976900
This commit is contained in:
@ -365,7 +365,8 @@ public class SQLiteDatabase extends SQLiteClosable {
|
|||||||
@Override
|
@Override
|
||||||
protected void onAllReferencesReleased() {
|
protected void onAllReferencesReleased() {
|
||||||
if (isOpen()) {
|
if (isOpen()) {
|
||||||
dbclose();
|
// close the database which will close all pending statements to be finalized also
|
||||||
|
close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1042,7 +1043,7 @@ public class SQLiteDatabase extends SQLiteClosable {
|
|||||||
// finalize ALL statements queued up so far
|
// finalize ALL statements queued up so far
|
||||||
closePendingStatements();
|
closePendingStatements();
|
||||||
// close this database instance - regardless of its reference count value
|
// close this database instance - regardless of its reference count value
|
||||||
onAllReferencesReleased();
|
dbclose();
|
||||||
if (mConnectionPool != null) {
|
if (mConnectionPool != null) {
|
||||||
mConnectionPool.close();
|
mConnectionPool.close();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user