Re: SoftReferences and java.lang.OutOfMemoryError: Direct buffer memory

2020-12-29 Thread David Holmes
On 29/12/2020 7:15 pm, Florian Weimer wrote: * 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 hea

Re: SoftReferences and java.lang.OutOfMemoryError: Direct buffer memory

2020-12-29 Thread Florian Weimer
* 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-referenc

Re: SoftReferences and java.lang.OutOfMemoryError: Direct buffer memory

2020-12-28 Thread David Holmes
Hi Brett, On 29/12/2020 5:16 am, Brett Okken wrote: I am cross posting this from the nio-dev mailing list. The javadoc for SoftReference states: All soft references to softly-reachable objects are guaranteed to have been cleared before the virtual machine throws an OutOfMemoryError. As pointed