RFR: 8299337: The java.awt.image.ColorModel#pData field is unused

Phil Race prr at openjdk.org
Thu Jan 5 23:01:53 UTC 2023


On Sat, 24 Dec 2022 03:49:38 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> I have found that we store the native pointer in the "java.awt.image.ColorModel#pData" field and never update/clean it. We can check how and when the native data is deallocated and reset the pointer, but it will be easy just to delete the field as unused.

Marked as reviewed by prr (Reviewer).

src/java.desktop/unix/native/common/awt/X11Color.c line 1231:

> 1229:         JNU_SetLongFieldFromPtr(env, awt_colormodel, g_CMpDataID,
> 1230:                                 aData->color_data);
> 1231: 

This is the one that is more work to track down but it seems it belongs to the X11GraphicsConfig and is managed / disposed by that.

-------------

PR: https://git.openjdk.org/jdk/pull/11785



More information about the client-libs-dev mailing list