News for hackers. Stuff that matters.
Re:On the impossibility of composing finalizers and FFI by fweimer on Tuesday February 27, 2024 @01:16AM (#39520711)
In many cases, you do not need to pin the object, only keep it alive. Current Java has a reachability fence for this: https://docs.oracle.com/en/java/javase/17/docs/api/java.base...

I think I saw this first in MLton, which has a touch function for this purpose: http://mlton.org/MLtonFinalizable

I'm not convince this is particularly hard to use functionality, all things considered. Supporting explicit deallocation in a safe way is much harder, especially if FFI callbacks are involved.

There are no comments on this comment yet.