google / jni-bind

JNI Bind is a set of advanced syntactic sugar for writing efficient correct JNI Code in C++17 (and up).
Apache License 2.0
266 stars 31 forks source link

Add implementation/test for `GlobalString` destruction. #337

Closed copybara-service[bot] closed 2 months ago

copybara-service[bot] commented 2 months ago

Add implementation/test for GlobalString destruction.

This was actually causing premature releases of GlobalString when directly constructed with arguments because it wasn't promoting its LocalObject after construction.

Also, add tests for graceful destruction of GlobalObject which isn't returned.