From: Matt Corallo Date: Sun, 12 Jan 2025 20:35:09 +0000 (+0000) Subject: [C#] Free Uint128 byte buffers after to-human conversions X-Git-Tag: v0.1.0.0~6 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=5cd79459646715df22763ab57de48c1783e6cbb9;p=ldk-java [C#] Free Uint128 byte buffers after to-human conversions --- diff --git a/csharp_strings.py b/csharp_strings.py index 38330aef..9432489e 100644 --- a/csharp_strings.py +++ b/csharp_strings.py @@ -632,7 +632,7 @@ int CS_LDK_register_{fn_suffix}_invoker(invoker_{fn_suffix} invoker) {{ def primitive_arr_to_hu(self, arr_ty, fixed_len, arr_name, conv_name): mapped_ty = arr_ty.subty if arr_ty.rust_obj == "LDKU128": - return "org.ldk.util.UInt128 " + conv_name + " = new org.ldk.util.UInt128(" + arr_name + ");" + return "org.ldk.util.UInt128 " + conv_name + " = new org.ldk.util.UInt128(" + arr_name + ");\nbindings.free_buffer(" + arr_name + ");" elif mapped_ty.c_ty == "uint8_t" or mapped_ty.c_ty == "int8_t": return "byte[] " + conv_name + " = InternalUtils.decodeUint8Array(" + arr_name + ");" elif mapped_ty.c_ty == "uint16_t" or mapped_ty.c_ty == "int16_t":