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
245 stars 29 forks source link

Implement simple passthrough type that can enable custom destructor implementations executed before proxied object. #208

Closed copybara-service[bot] closed 11 months ago

copybara-service[bot] commented 11 months ago

Implement simple passthrough type that can enable custom destructor implementations executed before proxied object.

This proxy could also forward operator(), but frustratingly, it isn't sufficient to forward for types like LocalObject, because it would imply passing const char* which the InvocableMap can't see through in a constexpr way.

I had hoped this coudl be used for a "non-deleting" LocalObject.

See https://github.com/google/jni-bind/issues/207 for context.