On Fri, 18 Jul 2025 20:51:04 GMT, Phil Race <p...@openjdk.org> wrote:
> 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. This pull request has now been integrated. Changeset: 0d0d93e8 Author: Phil Race <p...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/0d0d93e8f6e2e6d0831b011e47da0c6069f6f4f5 Stats: 31 lines in 2 files changed: 7 ins; 15 del; 9 mod 8210765: Remove finalize method in CStrike.java Reviewed-by: psadhukhan, achung, azvegint ------------- PR: https://git.openjdk.org/jdk/pull/26397