Commit de51c577 authored by Filippo Carone's avatar Filippo Carone

destroy logic cleaned up

parent c09b9f61
...@@ -90,8 +90,11 @@ public class JVLC implements Runnable { ...@@ -90,8 +90,11 @@ public class JVLC implements Runnable {
* This is unreversible. * This is unreversible.
*/ */
public void destroy() { public void destroy() {
beingDestroyed = true; if (!beingDestroyed)
_destroy(); {
beingDestroyed = true;
_destroy();
}
} }
...@@ -162,10 +165,7 @@ public class JVLC implements Runnable { ...@@ -162,10 +165,7 @@ public class JVLC implements Runnable {
* @see java.lang.Object#finalize() * @see java.lang.Object#finalize()
*/ */
protected void finalize() throws Throwable { protected void finalize() throws Throwable {
if (!beingDestroyed) destroy();
{
destroy();
}
super.finalize(); super.finalize();
} }
......
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