update to new upstream
[ldk-java] / src / main / java / org / ldk / structs / ChannelMonitorUpdate.java
index 9cc36c1af04178997b4e97d41c9ad58fb501c7eb..960c5f20eda2e950089ea7d49b9dd6276d76debd 100644 (file)
@@ -11,7 +11,7 @@ public class ChannelMonitorUpdate extends CommonBase {
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
                super.finalize();
-               bindings.ChannelMonitorUpdate_free(ptr);
+               if (ptr != 0) { bindings.ChannelMonitorUpdate_free(ptr); }
        }
 
        public static ChannelMonitorUpdate constructor_clone(ChannelMonitorUpdate orig) {
@@ -30,9 +30,8 @@ public class ChannelMonitorUpdate extends CommonBase {
                bindings.ChannelMonitorUpdate_set_update_id(this.ptr, val);
        }
 
-       public byte[] write(ChannelMonitorUpdate obj) {
-               byte[] ret = bindings.ChannelMonitorUpdate_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.ChannelMonitorUpdate_write(this.ptr);
                return ret;
        }