Hello,
Unfortunately in case of in-memory databases there seems to be a nasty memory leak. The leak is not present in case of on-disk databases.
According to Eclipse MAT:
One instance of "org.h2.mvstore.tx.TransactionStore$TxMapBuilder$TMVMap" occupies 1 493 666 840 (81,97%) bytes. The memory is accumulated in one instance of "org.h2.mvstore.RootReference".
This is 100% reproducible. The memory is not freed even after the in-mem database is closed, all references to it are nullified and the garbage collector is invoked manually.