java.lang.foreign.Arena
var myObj = new(my_arena) MyClass();
You can either do the whole boilerplate manually with Panama set of APIs, or write a C header file and let jextract do the work of boilerplate generation.
I am wondering if there is working code example, or this is just speculation?