import java.lang.ref.*;
import java.util.HashSet;

class JarJarToyCleanupInfo extends PhantomReference {
	static JarJarToyCleanupManager cm = new JarJarToyCleanupManager();
	static HashSet allocated = new HashSet();

	int i;

	JarJarToyCleanupInfo(JarJarToy jj) {
		super(jj, cm);
		this.i = jj.i;
		allocated.add(this);
	}

	void doCleanup() {
		allocated.remove(this);
		System.out.println("doCleanup() for " + i);
	}
}
