Navigation Menu

Skip to content

Commit

Permalink
Close the database handle when cleaning up the activity
Browse files Browse the repository at this point in the history
  • Loading branch information
matburt committed May 4, 2011
1 parent d401b6f commit 977a2f8
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -53,6 +53,12 @@ protected void onCreate(Bundle savedInstanceState) {
mSaveNode.setOnClickListener(this); mSaveNode.setOnClickListener(this);
} }


@Override
public void onDestroy() {
this.mOrgDb.close();
super.onDestroy();
}

public void setSpinner(Spinner view, ArrayList data, String selection) { 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. // 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. // Instead, we'll retrieve the todos from the database, and we'll use an array adapter.
Expand Down

0 comments on commit 977a2f8

Please sign in to comment.