Re:Chris Lattner on garbage collection vs. Automatic Referen...
by vips7L on Sunday April 24, 2022 @06:42PM
(#31148964)
Personally I wish they would move some escape analysis to compile time just to help with memory consumption. Iām assuming it would require byte code changes though.
https://en.m.wikipedia.org/wiki/List_of_Java_virtual_machine...
As it stands is mostly done at runtime and only for a).
Otherwise you are better with try-resources, and for something like malloced memory there are off-GC heap APIs.
Also Valhalla will eventually land, although it is getting long by now.