[concurrency-interest] DirectByteBuffers and reachabilityFence

Justin Sampson jsampson at guidewire.com
Tue Dec 8 22:25:57 EST 2015

Andrew Haley wrote:

> It's not just HotSpot, though: some VMs are even more aggressive,
> and we have seen finalizers executed even before constructors have
> completed. And that is allowed by the specification.

How so? I mean, I understand that an object may become unreachable
before the completion of its constructor due to inlining, but the
finalizer is not allowed to run at that point:

"The completion of an object's constructor happens-before the
execution of its finalize method (in the formal sense of



More information about the Concurrency-interest mailing list