title: When to close Cursor used in SimpleCursorAdapter
body: <p>I'm using a SimpleCursorAdapter to display results in a ListView but since I've got to query my database lots of times during a search (using the SearchView widget) it worries me that the cursor might be left opened.</p>
  
  <p>This is how I query my database and show the results in a ListView:</p>
  
  <pre><code>class SearchCustomers extends AsyncTask&lt;String,Void,Cursor&gt;{
  
          @Override
          protected Cursor doInBackground(String... params) {         
              //get the query
              String query=params[0].toLowerCase(Locale.getDefault());
              Cursor cursor=mDB.searchCustomersByName((query != null ? query : "@@@@"));
              return cursor;
  
          }
  
          @Override
          protected void onPostExecute(Cursor result) {           
  
              if (result != null) {
  
                  String[] from = new String[] { QuickOrderDB.ID,
                          QuickOrderDB.NAME,
                          QuickOrderDB.ADDRESS,
                          QuickOrderDB.PHONE_NUMBER };
  
                  int[] to = new int[] { R.id.customerIDTextView,
                          R.id.customerNameTextView,R.id.customerAddressTextView ,
                          R.id.customerPhoneTextView };
  
                  SimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(SearchCustomersActivity.this,
                          R.layout.results_customer_item, result, from, to);
                  mResultsListView.setAdapter(cursorAdapter);                 
  
              }
          }           
  
      }   
  </code></pre>
  
  <p>I have tried many things to close the cursor, but even If I close it after <code>mResultsListView.setAdapter(cursorAdapter);</code> the result is always the same: <strong>an empty ListView</strong>.</p>
  
  <p>I've already seen a couple of questions in which it is mentioned that the cursor will be closed automatically, but I want to make sure this is true. </p>
  
  <p><strong>Is there any official documentation about this? Does the SimpleCursorAdapter really close the cursor automatically?</strong>?</p>
  
  <p>Thanks in advance.</p>