X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FPong.ts;h=58be169f8d101530f3d3079658feebe15c26c260;hb=9e8763c71cd61d55be7c869d973524f75209a3f3;hp=3305de2acdb58a8b1ef9bacb9de58f04a9e930a3;hpb=acecce750cf1159a51f9d1a4dbfd717520739e92;p=ldk-java diff --git a/ts/structs/Pong.ts b/ts/structs/Pong.ts index 3305de2a..58be169f 100644 --- a/ts/structs/Pong.ts +++ b/ts/structs/Pong.ts @@ -18,12 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.Pong_free(this.ptr); } } - public Pong clone() { - number ret = bindings.Pong_clone(this.ptr); - const ret_hu_conv: Pong = new Pong(null, ret); - return ret_hu_conv; - } - public number get_byteslen() { number ret = bindings.Pong_get_byteslen(this.ptr); return ret; @@ -36,6 +30,14 @@ import * as bindings from '../bindings' // TODO: figure out location public static Pong constructor_new(number byteslen_arg) { number ret = bindings.Pong_new(byteslen_arg); const ret_hu_conv: Pong = new Pong(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public Pong clone() { + number ret = bindings.Pong_clone(this.ptr); + const ret_hu_conv: Pong = new Pong(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; }