Example usage for android.database.sqlite SQLiteConnectionPool close

List of usage examples for android.database.sqlite SQLiteConnectionPool close

Introduction

In this page you can find the example usage for android.database.sqlite SQLiteConnectionPool close.

Prototype

public void close() 

Source Link

Document

Closes the connection pool.

Usage

From source file:io.requery.android.database.sqlite.SQLiteDatabase.java

private void dispose(boolean finalized) {
    final SQLiteConnectionPool pool;
    synchronized (mLock) {
        if (mCloseGuardLocked != null) {
            if (finalized) {
                mCloseGuardLocked.warnIfOpen();
            }/*from   ww  w  .jav a 2  s  . co  m*/
            mCloseGuardLocked.close();
        }

        pool = mConnectionPoolLocked;
        mConnectionPoolLocked = null;
    }

    if (!finalized) {
        synchronized (sActiveDatabases) {
            sActiveDatabases.remove(this);
        }

        if (pool != null) {
            pool.close();
        }
    }
}