RFR: 8284490: Remove finalizer method in java.security.jgss
Daniel Fuchs
dfuchs at openjdk.java.net
Thu Apr 7 10:54:40 UTC 2022
On Thu, 7 Apr 2022 04:10:55 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:
> Please review the update to remove finalizer method in the java.security.jgss module. It is one of the efforts to clean up the use of finalizer method in JDK.
src/java.security.jgss/share/classes/sun/security/jgss/wrapper/GSSCredElement.java line 74:
> 72: name = srcName;
> 73:
> 74: Cleaner.create().register(this, this::dispose);
This will create a memory leak: `this` will never be garbage collected if it's referenced by the cleaner action.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8136
More information about the security-dev
mailing list