diff options
Diffstat (limited to 'vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py')
-rw-r--r-- | vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py b/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py index 1a35a6c0..5fc84c7b 100644 --- a/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py +++ b/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py @@ -222,6 +222,8 @@ static void vl_api_${handler_name}_t_handler (vl_api_${handler_name}_t * mp) $dto_setters (*env)->CallVoidMethod(env, plugin_main->callbackObject, callbackMethod, dto); + // free DTO as per http://stackoverflow.com/questions/1340938/memory-leak-when-calling-java-code-from-c-using-jni + (*env)->DeleteLocalRef(env, dto); }""") |