From fdee01d976f7d2aa61410aa4d009a00aabd3d2e6 Mon Sep 17 00:00:00 2001 From: Hugo Guerrier Date: Thu, 18 Apr 2024 17:04:26 +0200 Subject: [PATCH] Replace errnoeous 'UnmanagedMemory.free' call by 'NI_LIB.free' calls --- langkit/templates/java_api/main_class.mako | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langkit/templates/java_api/main_class.mako b/langkit/templates/java_api/main_class.mako index 2e3ec7899..271d8e9e2 100644 --- a/langkit/templates/java_api/main_class.mako +++ b/langkit/templates/java_api/main_class.mako @@ -4260,7 +4260,7 @@ public final class ${ctx.lib_name.camel} { } // Free the native array - UnmanagedMemory.free(unitArrayNative); + NI_LIB.${nat("free")}(unitArrayNative); // Return the Java list as an array return resList.toArray(new RewritingUnit[0]); @@ -4835,7 +4835,7 @@ public final class ${ctx.lib_name.camel} { } // Free the native children - UnmanagedMemory.free(children); + NI_LIB.${nat("free")}(children); // Return the result return res;