RFR: 8334868: Ensure CheckUninstallModalHook is called in WPageDialogPeer._show

Alexey Ivanov aivanov at openjdk.org
Thu Jun 27 13:33:10 UTC 2024


On Thu, 27 Jun 2024 13:15:19 GMT, Julian Waters <jwaters at openjdk.org> wrote:

> It would be helpful if JNI had a jobject unique_ptr type for C++

But `std::unique_ptr` wasn't available when JNI had been conceived…

It could be added…

The declaration in your sample still looks cumbersome… or _unwieldy_ as you said. Writing a custom deleter for each `jobject` doesn't look good either.

Most local references don't require explicit `DeleteLocalRef`, which also helps, I guess.

> Oops, you sent your correction about the custom deleter just as I sent my post

C++ has got many new features… I'm learning these feature on the fly since I don't use C++ as often.

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

PR Comment: https://git.openjdk.org/jdk/pull/19867#issuecomment-2194699149


More information about the client-libs-dev mailing list