Currently Platform code attempts to free the Core companion object in methods that guarantee that the companion will not be needed again: `close()`, `delete()` and perhaps others.
These methods, though, are public API methods and can be called by client code in an `inBatch` block. On some platforms this will crash Core. On others it will leak the database.
Platform code should explicitly disallow calling methods that could free the Core companion object, from within an `inBatch` block.
Core currently forbids closing or deleting the database, from within a transaction, but cannot, effectively check for operations that would free it (release). Platform code should do this.