On Tue, 6 Dec 2022 20:40:34 GMT, Roger Riggs <[email protected]> wrote:
> The existing code more obviously handles memory deallocation.
Thomas Stuefe suggested something like this
JNU_CHECK_EXCEPTION_DO(env, action)
JNU_CHECK_EXCEPTION_DO_AND_RETURN(env, action, retval)
usage example:
`JNU_CHECK_EXCEPTION_DO(env, { free(tab); })`
This would make the free-ing more clear, and should also work for 2 free-calls,
we a have places like this in the codebase. What do you think about this?
-------------
PR: https://git.openjdk.org/jdk/pull/11539