final Unreferenced unrefObj = (Unreferenced) obj;
final Thread t = (Thread)
java.security.AccessController.doPrivileged(
new NewThreadAction(new Runnable() {
public void run() {
unrefObj.unreferenced();
}
}, "Unreferenced-" + nextThreadNum++, false, true));
// REMIND: access to nextThreadNum not synchronized; you care?
/*
* We must manually set the context class loader appropriately