Thanks for your help! I have found the reason for the problem: the
session keeps a set of temporary result sets so that temporary files
are deleted early. However this is not essential. It is possible to
disable this feature, but you need to recompile H2. The problem is
Session.addTemporaryResult(..). If you remark all code in this method
the leak is gone.
This problem will be fixed for the next release (the fix is a bit more
complicated).
Regards,
Thomas