Thanks for the replies Dan and Roger.
> My recommendation would be to only use
> ObjectReference.DisableCollection()
> when you have observed a specific failure for a specific object in a
> test.
OK. I will submit an RFR soon to guard the specific case that we've observed
consistently failing
Hi,
You may also find useful java.lang.ref.Reference.reachabilityFence(obj [1] .
It is designed to prevent the compiler from optimizing away a reference.
It keeps the object referenced up to that point.
[1]
https://download.java.net/java/GA/jdk14/docs/api/java.base/java/lang/ref/Reference.html#
Aditya,
I think you've found the right alias...
A similar observation was made here:
http://mail.openjdk.java.net/pipermail/serviceability-dev/2020-March/030635.html
It looks like that conversation didn't go beyond Egor's original message
and Chris P's reply.
My recommendation would be to onl