Commit 2f54a73f by David Daney Committed by Tom Tromey

Reference.java (clear): Set referent to null and synchronize.

2003-09-19  David Daney <ddaney@avtrex.com>

	* java/lang/ref/Reference.java (clear): Set referent to null and
	synchronize.

From-SVN: r71597
parent f55f60a5
2003-09-19 David Daney <ddaney@avtrex.com>
* java/lang/ref/Reference.java (clear): Set referent to null and
synchronize.
2003-09-19 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/NIODatagramSocket.java,
......
......@@ -176,7 +176,12 @@ public abstract class Reference
*/
public void clear()
{
cleared = true;
// Must synchronize so changes are visible in finalizer thread.
synchronized (lock)
{
referent = null;
cleared = true;
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment