Java Reference

Java Reference

BaseObject.java
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 4.0.2
4 *
5 * Do not make changes to this file unless you know what you are doing--modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
8
9package com.google.ortools.constraintsolver;
10
16public class BaseObject {
17 private transient long swigCPtr;
18 protected transient boolean swigCMemOwn;
19
20 protected BaseObject(long cPtr, boolean cMemoryOwn) {
21 swigCMemOwn = cMemoryOwn;
22 swigCPtr = cPtr;
23 }
24
25 protected static long getCPtr(BaseObject obj) {
26 return (obj == null) ? 0 : obj.swigCPtr;
27 }
28
29 @SuppressWarnings("deprecation")
30 protected void finalize() {
31 delete();
32 }
33
34 public synchronized void delete() {
35 if (swigCPtr != 0) {
36 if (swigCMemOwn) {
37 swigCMemOwn = false;
38 mainJNI.delete_BaseObject(swigCPtr);
39 }
40 swigCPtr = 0;
41 }
42 }
43
44 public BaseObject() {
45 this(mainJNI.new_BaseObject(), true);
46 }
47
48 public String toString() {
49 return mainJNI.BaseObject_toString(swigCPtr, this);
50 }
51
52}
A BaseObject is the root of all reversibly allocated objects.
Definition: BaseObject.java:16
BaseObject(long cPtr, boolean cMemoryOwn)
Definition: BaseObject.java:20