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.

Okay. Did you find this with SonarCloud?

Since this is c++, it may be simpler to use RAII for this. Up to you though, 
the patch is also fine in its current form.

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

Marked as reviewed by stuefe (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15038#pullrequestreview-1547515501

Reply via email to