RFR: 8235772: Remove use of deprecated finalize method from PiscesRenderer and AbstractSurface
kcr at openjdk.java.net
Fri Jan 3 23:50:44 UTC 2020
On Tue, 24 Dec 2019 06:37:05 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:
>> The dispose methods indeed won't set the `mem_Error_Flag` but this flag might have been set by other methods. Isn't there a probability that the flag has been set, and that `readAndClearMemErrorFlag()` is not yet called since the flag has been set?
> Hi Johan, I did miss to verify this angle.
> But have checked the code now and can confirm that, in a given function for all possible calls to `setMemErrorFlag()` there exists a call to `readAndClearMemErrorFlag()` in the same function. So it looks safe to remove the memory checks from `dispose()`
I also looked at the code and don't see any mismatches (including those called from the `ACQUIRE_SURFACE` macro). I suppose you could restore the call, but since we are in a disposer thread throwing an exception doesn't seem like the right thing to do. You could log the error, but if we are sure there can be no pending errors, it might not be worth the effort.
More information about the openjfx-dev