release

open override fun release(): Int

Release this instance while holding the current file lock.

NativeObject.release is synchronized on this object and may call cppDelete, which also needs the file lock. Taking the file lock first keeps disposal ordered as file lock -> object monitor -> native delete, matching other file-locked native wrappers.

Return

The new reference count.

Throws

if this instance has already been released.