On Tue, 12 Aug 2025 18:56:56 GMT, Phil Race <p...@openjdk.org> wrote:
> It seems that finalize() in X11InputMethodBase.java isn't useful. > It calls dispose(), which in all actual implementations has just one native > resource to release, which > is a native struct of type X11InputMethodData (this is a JDK-defined struct, > not one from Xim), > and one of the fields is a JNI GlobalRef pointing to the XInputMethod > instance which implements the dispose() method. > So finalize cannot be called unless dispose() is called first. But if > dispose() has been called then there's no need for > finalize() since all it does is call dispose() > > Many more details in JBS. LGTM. ------------- Marked as reviewed by tr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26751#pullrequestreview-3114213540