Close was never explicitly called
<p>I have a listview that is sourced by an sqlite db. I call fillData() at several different points to update the listview.</p>

<pre><code>private void fillData() {
        mDbHelper.open();
        Cursor c = mDbHelper.fetchAllNotes(table, columns, selection, selectionArgs, null, null);
        startManagingCursor(c);

        String[] from = new String[] { "quantity", "color", "style" };
        int[] to = new int[] { R.id.textQuantity, R.id.textColor, R.id.textStyle };
        setListAdapter(new SimpleCursorAdapter(this, R.layout.recordrow, c, from, to) {
            @Override
            public View getView(int position, View convertView, ViewGroup parent) {
                View v = super.getView(position, convertView, parent);
                return v;
            }
        });
}
</code></pre>

<p>That works... problem is, when I open/close/jump around activities, I get errors in logcat. It doesn't crash the program though. The errors are:<br>
<br>
Please ensure you explicitly call close() on your cursor<br>
and<br>
close() was never explicitly called on database<br><br></p>

<p>So under }); if I put mDbHelper.close() it crashes saying database not open. If I put c.close(), my listview never populates. I've tried putting them in various other places and it gives me errors saying cursor/database already closed. Any ideas on what to do?</p>
