summaryrefslogtreecommitdiff
path: root/src/runtime/java/org/grammaticalframework/pgf/Pool.java
blob: 6c326b76ff2bae2ed0910ebed563d17ee797052a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package org.grammaticalframework.pgf;

class Pool {
	final long ref;

	public Pool(long ref) {
		this.ref = ref;
	}

	public Pool() {
		this.ref = alloc();
	}

	public void finalize() {
		free(ref);
	}

	public static native long alloc();
	public static native void free(long ref);
}