/**
   * Try to close everything when destroyed.
   *
   * @throws Throwable reference:
   *     http://stackoverflow.com/questions/4557154/android-sqlite-db-when-to-close
   *     http://stackoverflow.com/questions/14469782/android-sqlite-right-way-to-open-close-db
   */
  @Override
  public void finalize() throws Throwable {
    closeDatabase();
    //        if (mInstance != null) {
    //            mInstance.close();
    //        }

    super.finalize();
  }
 @Override
 protected void finalize() throws Throwable {
   db.close();
   super.finalize();
 }