SQLiteClosable
abstract class SQLiteClosable : Closeable
| kotlin.Any | |
| ↳ | android.database.sqlite.SQLiteClosable | 
An object created from a SQLiteDatabase that can be closed. This class implements a primitive reference counting scheme for database objects.
Summary
| Public constructors | |
|---|---|
| Public methods | |
|---|---|
| open Unit | Acquires a reference to the object. | 
| open Unit | close()Releases a reference to the object, closing the object if the last reference was released. | 
| open Unit | Releases a reference to the object, closing the object if the last reference was released. | 
| open Unit | Releases a reference to the object that was owned by the container of the object, closing the object if the last reference was released. | 
| Protected methods | |
|---|---|
| abstract Unit | Called when the last reference to the object was released by a call to  | 
| open Unit | Called when the last reference to the object was released by a call to  | 
Public constructors
SQLiteClosable
SQLiteClosable()
Public methods
acquireReference
open fun acquireReference(): Unit
Acquires a reference to the object.
| Exceptions | |
|---|---|
| java.lang.IllegalStateException | if the last reference to the object has already been released. | 
close
open fun close(): Unit
Releases a reference to the object, closing the object if the last reference was released. Calling this method is equivalent to calling releaseReference.
| Exceptions | |
|---|---|
| java.lang.Exception | if this resource cannot be closed | 
| java.io.IOException | if an I/O error occurs | 
releaseReference
open fun releaseReference(): Unit
Releases a reference to the object, closing the object if the last reference was released.
See Also
releaseReferenceFromContainer
open funreleaseReferenceFromContainer(): Unit
Deprecated: Do not use.
Releases a reference to the object that was owned by the container of the object, closing the object if the last reference was released.
Protected methods
onAllReferencesReleased
protected abstract fun onAllReferencesReleased(): Unit
Called when the last reference to the object was released by a call to releaseReference() or #close().
onAllReferencesReleasedFromContainer
protected open funonAllReferencesReleasedFromContainer(): Unit
Deprecated: Do not use.
Called when the last reference to the object was released by a call to releaseReferenceFromContainer().
