update to new upstream
[ldk-java] / src / main / java / org / ldk / structs / NodeInfo.java
index bc45360944282cfc299970df8066c17e5d8d03ea..5f4aed27a135182645ef1d4bc5bfd540ad8537e5 100644 (file)
@@ -11,7 +11,7 @@ public class NodeInfo extends CommonBase {
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
                super.finalize();
-               bindings.NodeInfo_free(ptr);
+               if (ptr != 0) { bindings.NodeInfo_free(ptr); }
        }
 
        public void set_channels(long[] val) {
@@ -37,9 +37,8 @@ public class NodeInfo extends CommonBase {
 
        // Skipped NodeInfo_set_announcement_info
        // Skipped NodeInfo_new
-       public byte[] write(NodeInfo obj) {
-               byte[] ret = bindings.NodeInfo_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.NodeInfo_write(this.ptr);
                return ret;
        }