On Wed, 26 Jul 2023 10:43:20 GMT, Matthias Baesken <[email protected]> wrote:
> In src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp GetRGBPixels > we release some resources at the end of the function by calling > DeleteObject/DeleteDC. This is recommended by the MS API docs. > However this should be done as well in some early leaving with throw that can > occur in this function. One additional idea - in case of failing IS_SAFE* checks (leading to the throw astd::bad_alloc) , should we add some tracing to make clear what went wrong ? We have J2dTraceLn1 / J2dTraceLn<n> for this; unfortunately it seems to be only active for DEBUG-builds . ------------- PR Comment: https://git.openjdk.org/jdk/pull/15038#issuecomment-1651569809
