jduo commented on code in PR #40101:
URL: https://github.com/apache/arrow/pull/40101#discussion_r1492785367


##########
java/dataset/src/main/cpp/jni_wrapper.cc:
##########
@@ -83,6 +83,40 @@ void ThrowIfError(const arrow::Status& status) {
   }
 }
 
+class JNIEnvGuard {
+ public:
+  explicit JNIEnvGuard(JavaVM* vm) : vm_(vm), should_detach_(false) {

Review Comment:
   This should initialize in the order the fields are declared, and env_ should 
be initialized. Probably better to re-order the fields such that the bool is 
the last field though to minimize padding.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to