Skip to content

Register the MessageDigest object with the Cleaner#104

Merged
pushkarnk merged 1 commit intocanonical:mainfrom
pushkarnk:fix-103
Feb 28, 2026
Merged

Register the MessageDigest object with the Cleaner#104
pushkarnk merged 1 commit intocanonical:mainfrom
pushkarnk:fix-103

Conversation

@pushkarnk
Copy link
Collaborator

Unlike the other OpenSSL wrapper objects, MessageDigest registered the nativeHandle(long) with the Cleaner, which accepts java.lang.Object. The long is likely to get auto-boxed and become phantom-reachable immediately, causing a clean-up on the next GC cycle.

Unlike the other OpenSSL wrapper objects, MessageDigest
registered the nativeHandle(long) with the Cleaner, which
accepts java.lang.Object. The long is likely to get auto-boxed
and become phantom-reachable immediately, causing a clean-up
on the next GC cycle.
@pushkarnk pushkarnk merged commit 8f8fadc into canonical:main Feb 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant