Replace errnoeous 'UnmanagedMemory.free' call by 'NI_LIB.free' calls

This commit is contained in:
Hugo Guerrier
2024-04-18 17:04:26 +02:00
parent aacadb2c05
commit fdee01d976

View File

@@ -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;