Permalink
Browse files

Close the database handle when cleaning up the activity

  • Loading branch information...
1 parent d401b6f commit 977a2f81bb55e982f09b7334e7829acc04e1b017 @matburt committed May 4, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/com/matburt/mobileorg/Capture/ViewNodeDetailsActivity.java
@@ -53,6 +53,12 @@ protected void onCreate(Bundle savedInstanceState) {
mSaveNode.setOnClickListener(this);
}
+ @Override
+ public void onDestroy() {
+ this.mOrgDb.close();
+ super.onDestroy();
+ }
+
public void setSpinner(Spinner view, ArrayList data, String selection) {
// I can't use a simple cursor here because the todos table does not store an _id yet.
// Instead, we'll retrieve the todos from the database, and we'll use an array adapter.

0 comments on commit 977a2f8

Please sign in to comment.