number res_b = bindings.LDKC2Tuple_BlockHashChannelManagerZ_get_b(res);
const res_b_hu_conv: ChannelManager = new ChannelManager(null, res_b);
res_b_hu_conv.ptrs_to.add(this);;
- TwoTuple<Uint8Array, ChannelManager> res_conv = new TwoTuple<Uint8Array, ChannelManager>(res_a, res_b_hu_conv);
+ TwoTuple<Uint8Array, ChannelManager> res_conv = new TwoTuple<Uint8Array, ChannelManager>(res_a, res_b_hu_conv, () -> {
+ bindings.C2Tuple_BlockHashChannelManagerZ_free(res);
+ });
+ res_b_hu_conv.ptrs_to.add(res_conv);
this.res = res_conv;
}
public Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK(TwoTuple<Uint8Array, ChannelManager> res) {