Skip to content

Commit

Permalink
close database connectors
Browse files Browse the repository at this point in the history
  • Loading branch information
DevEmperor committed Oct 3, 2024
1 parent 652b5de commit df4b163
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ protected void onDestroy() {
thread.shutdownNow();
}
chatAdapter.shutdownServices();
usageDatabaseHelper.close();
chatHistoryDatabaseHelper.close();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ protected void onDestroy() {
if (thread != null) {
thread.shutdownNow();
}
usageDatabaseHelper.close();
imagesDatabaseHelper.close();
}

private void createAndDownloadImage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ protected void onDestroy() {
}

if (speechApiThread != null) speechApiThread.shutdownNow();

usageDatabaseHelper.close();
}

@Override
Expand Down

0 comments on commit df4b163

Please sign in to comment.