ditto-lib / live.ditto.ffi / FfiResource / release

release

open static fun release(o: AutoCloseable!): Int

Release an object that has previously been retained. If the reference count decrements to zero, the strong reference to that object will be removed and close() will be called.

Parameters

o - AutoCloseable!: The resource to release

Exceptions

Exception - Either an exception thrown while closing the resource, or an OverReleaseException when the passed object is not currently retained.

Return
Int: The reference count after releasing