On Mon, 20 Nov 2023 20:03:28 GMT, Phil Race <[email protected]> wrote:
>> Sorry, I was trying to keep as close to the original code as possible. Woah, >> does that mean the original was bugged, since it was deleting a NULL canvas? >> Anyway, should I change the string to canvas or just keep it as "peer" like >> the original code does in that case? > > Not buggy per se, since NULL is allowed > https://docs.oracle.com/en/java/javase/21/docs/specs/jni/functions.html#deleteglobalref > > But that doesn't make it good practice. > > Yes, change the name because then it is more precise. Is the new code better? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1400090582
