map opaque struct header
[ldk-java] / src / main / java / org / ldk / structs / CommitmentUpdate.java
index b78bf90731df7e76758229ff87384ebbd9578c77..4b9d1535c12b81452d5da331783038ec5bbd3f93 100644 (file)
@@ -11,13 +11,12 @@ public class CommitmentUpdate extends CommonBase {
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
                super.finalize();
-               bindings.CommitmentUpdate_free(ptr);
+               if (ptr != 0) { bindings.CommitmentUpdate_free(ptr); }
        }
 
-       public static CommitmentUpdate constructor_clone(CommitmentUpdate orig) {
-               long ret = bindings.CommitmentUpdate_clone(orig == null ? 0 : orig.ptr & ~1);
+       public CommitmentUpdate clone() {
+               long ret = bindings.CommitmentUpdate_clone(this.ptr);
                CommitmentUpdate ret_hu_conv = new CommitmentUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(orig);
                return ret_hu_conv;
        }