zhangstar333 commented on code in PR #13854:
URL: https://github.com/apache/doris/pull/13854#discussion_r1010212812


##########
be/src/vec/functions/function_java_udf.cpp:
##########
@@ -93,6 +93,10 @@ Status JavaFunctionCall::prepare(FunctionContext* context,
 
         RETURN_IF_ERROR(SerializeThriftMsg(env, &ctor_params, 
&ctor_params_bytes));
         jni_ctx->executor = env->NewObject(executor_cl_, executor_ctor_id_, 
ctor_params_bytes);
+
+        jbyte* pBytes = env->GetByteArrayElements(ctor_params_bytes, nullptr);
+        env->ReleaseByteArrayElements(ctor_params_bytes, pBytes, JNI_ABORT);
+        env->DeleteLocalRef(ctor_params_bytes);

Review Comment:
   have checked udaf ctor new object as same way,  would you add delete ref 
together 



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to