Skip to content

8210765: Remove finalize method in CStrike.java #26397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

prrace
Copy link
Contributor

@prrace prrace commented Jul 18, 2025

Remove finalize method from CStrike.java

This one is a bit odd in that there's already a Disposer used - and in fact it involves two classes
CStrikeDisposer.java and its subclass - the nested class CStrike.GlyphInfoCache
CStrike.GlyphInfoCache is tracking all the glyph image references.

CStrikeDisposer has the full set of constructors of its superclass - FontStrikeDisposer including support
for the native context

And if supplied, CStrikeDisposer will call the native method freeNativeScalerContext(long) to free the native context
but that native method does not exist !
And there's no CStrike.GlyphInfoCache constructor which allows it to be specified

So the fix is to add that and call the disposeNativeStrikePtr method instead.

I also rejigged things a little so nativeStrikePtr could be final which is supposed to help with the thread visibility.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8210765: Remove finalize method in CStrike.java (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26397/head:pull/26397
$ git checkout pull/26397

Update a local copy of the PR:
$ git checkout pull/26397
$ git pull https://git.openjdk.org/jdk.git pull/26397/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26397

View PR using the GUI difftool:
$ git pr show -t 26397

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26397.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 18, 2025

👋 Welcome back prr! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jul 18, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title 8210765 8210765: Remove finalize method in CStrike.java Jul 18, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 18, 2025
@openjdk
Copy link

openjdk bot commented Jul 18, 2025

@prrace The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@mlbridge
Copy link

mlbridge bot commented Jul 18, 2025

Webrevs

@prrace prrace marked this pull request as draft July 19, 2025 21:03
@openjdk openjdk bot removed the rfr Pull request is ready for review label Jul 19, 2025
@prrace
Copy link
Contributor Author

prrace commented Jul 19, 2025

/label remove rfr
Not ready yet

@openjdk
Copy link

openjdk bot commented Jul 19, 2025

@prrace
The label rfr is not a valid label.
These labels are valid:

  • graal
  • serviceability
  • hotspot
  • hotspot-compiler
  • ide-support
  • i18n
  • shenandoah
  • jdk
  • javadoc
  • security
  • hotspot-runtime
  • jmx
  • build
  • nio
  • client
  • core-libs
  • compiler
  • net
  • hotspot-gc
  • hotspot-jfr

@prrace prrace marked this pull request as ready for review July 21, 2025 16:45
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client [email protected] rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

1 participant