SoftReferences and java.lang.OutOfMemoryError: Direct buffer memory
Florian Weimer
fw at deneb.enyo.de
Tue Dec 29 09:15:02 UTC 2020
* David Holmes:
> More accurately soft-references will be cleared before throwing an OOME
> due to Java heap exhaustion. There are other things that can throw OOME
> (like your array example, or "throw new OutOfMemoryError();") that don't
> correspond to heap exhaustion and and so soft-reference clearing doesn't
> enter the picture.
I think it's still a bug in the spec due to the way it is worded.
More information about the core-libs-dev
mailing list