MCPcopy Create free account
hub / github.com/Ahmeth4n/renef / lua_java_instance_gc

Function lua_java_instance_gc

src/agent/lua/api_java.c:936–948  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

934}
935
936static int lua_java_instance_gc(lua_State* L) {
937 jobject* ud = (jobject*)luaL_checkudata(L, 1, JAVA_INSTANCE_MT);
938 jobject instance = *ud;
939
940 if (instance) {
941 JNIEnv* env = get_jni_env();
942 if (env) {
943 (*env)->DeleteGlobalRef(env, instance);
944 }
945 }
946
947 return 0;
948}
949
950static const luaL_Reg java_wrapper_methods[] = {
951 {"new", lua_java_new},

Callers

nothing calls this directly

Calls 1

get_jni_envFunction · 0.85

Tested by

no test coverage detected