super(null, ptr);
const outpoint: number = obj.outpoint;
const outpoint_hu_conv: OutPoint = new OutPoint(null, outpoint);
+ outpoint_hu_conv.ptrs_to.add(this);
this.outpoint = outpoint_hu_conv;
const output: number = obj.output;
TxOut output_conv = new TxOut(null, output);
super(null, ptr);
const outpoint: number = obj.outpoint;
const outpoint_hu_conv: OutPoint = new OutPoint(null, outpoint);
+ outpoint_hu_conv.ptrs_to.add(this);
this.outpoint = outpoint_hu_conv;
this.per_commitment_point = obj.per_commitment_point;
this.to_self_delay = obj.to_self_delay;
const key_derivation_params: number = obj.key_derivation_params;
number key_derivation_params_a = bindings.LDKC2Tuple_u64u64Z_get_a(key_derivation_params);
number key_derivation_params_b = bindings.LDKC2Tuple_u64u64Z_get_b(key_derivation_params);
- TwoTuple<Number, Number> key_derivation_params_conv = new TwoTuple<Number, Number>(key_derivation_params_a, key_derivation_params_b);
+ TwoTuple<Number, Number> key_derivation_params_conv = new TwoTuple<Number, Number>(key_derivation_params_a, key_derivation_params_b, () -> {
+ bindings.C2Tuple_u64u64Z_free(key_derivation_params);
+ });
this.key_derivation_params = key_derivation_params_conv;
this.revocation_pubkey = obj.revocation_pubkey;
}
super(null, ptr);
const outpoint: number = obj.outpoint;
const outpoint_hu_conv: OutPoint = new OutPoint(null, outpoint);
+ outpoint_hu_conv.ptrs_to.add(this);
this.outpoint = outpoint_hu_conv;
const output: number = obj.output;
TxOut output_conv = new TxOut(null, output);
const key_derivation_params: number = obj.key_derivation_params;
number key_derivation_params_a = bindings.LDKC2Tuple_u64u64Z_get_a(key_derivation_params);
number key_derivation_params_b = bindings.LDKC2Tuple_u64u64Z_get_b(key_derivation_params);
- TwoTuple<Number, Number> key_derivation_params_conv = new TwoTuple<Number, Number>(key_derivation_params_a, key_derivation_params_b);
+ TwoTuple<Number, Number> key_derivation_params_conv = new TwoTuple<Number, Number>(key_derivation_params_a, key_derivation_params_b, () -> {
+ bindings.C2Tuple_u64u64Z_free(key_derivation_params);
+ });
this.key_derivation_params = key_derivation_params_conv;
}
}