title: Android SQLiteException unable to close due to unfinalised statements
body: <p>In my android app when I'm trying to query the database, everything works fine but sometimes I'm getting this exception, not always. I searched for this problem and found solutions that works for others but not for me.</p>
  
  <p>I'm using this code in another thread in AsyncTask</p>
  
  <pre><code>Cursor data = db.rawQuery(sql.toString(), null);
  
  
      if (data != null &amp;&amp; data.moveToFirst())
      {
          do
          {
              Account acc = new Account();
              acc.setId(data.getLong(0));
              acc.setName(data.getString(1));
  
              Price balance = new Price(0L, Price.theUnit);
              balance.setAmount(data.getString(2), Price.rial);
              acc.setBalance(balance);
  
              accounts.add(acc);
  
          } while (data.moveToNext());
      }
  
      data.close();
      dbHelper.close();
  </code></pre>
  
  <p>What is the problem?</p>