X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FChannelKeys.ts;h=61daa2567a913f860b8010839fe09d0af42cf937;hb=3a507eb07003be3e6714e8a87fb397c09b401ce9;hp=957dc512f372b5d836e2b00ca93db6c76007554d;hpb=ceda1e3041ff42b4aadc1245f6da26fd511b51ff;p=ldk-java diff --git a/ts/structs/ChannelKeys.ts b/ts/structs/ChannelKeys.ts index 957dc512..61daa256 100644 --- a/ts/structs/ChannelKeys.ts +++ b/ts/structs/ChannelKeys.ts @@ -138,7 +138,9 @@ import * as bindings from '../bindings' // TODO: figure out location number ret = bindings.ChannelKeys_key_derivation_params(this.ptr); number ret_a = bindings.LDKC2Tuple_u64u64Z_get_a(ret); number ret_b = bindings.LDKC2Tuple_u64u64Z_get_b(ret); - TwoTuple ret_conv = new TwoTuple(ret_a, ret_b); + TwoTuple ret_conv = new TwoTuple(ret_a, ret_b, () -> { + bindings.C2Tuple_u64u64Z_free(ret); + }); return ret_conv; }