close

open override fun close()

Release resources owned by this wallet (e.g. connection pools).

The default implementation is a no-op so existing implementations remain source- and binary-compatible. Implementations that own closeable resources (such as a connection pool they created) should override this. Wallets that were handed externally managed resources must NOT close them here.

Example:

factory.create(...).use { wallet ->
wallet.store(credential)
} // pool owned by the wallet is closed here