JFactory: delete BDDWImplWithFinalizer
It's know to be unsafe, we won't use it again.
@@ -59,19 +59,6 @@ public final class JFactory extends BDDFactory {
// Warning: we've never tried with this flag false.
private static final boolean FLUSH_CACHE_ON_GC = true;
- /**
- * If true, all BDDs will be created with a finalizer that attempts to free them if the user has
- * not done so. This flag implies non-trivial runtime overhead but defers BDD garbage collection
- * to Java, rather than manual user control of reference counting.
- */
- private static final boolean USE_FINALIZER = false;
-
- /**
- * When {@link #USE_FINALIZER} is true, setting this flag to true enables debug print messages
- * whenever BDDs are freed by the finalizer instead of by the calling code.
- */
- private static final boolean DEBUG_FINALIZER = false;
-
/**
* If set, assertions will be made on BDD internal computations. Used in developing the factory.
*/
@@ -96,12 +83,8 @@ public final class JFactory extends BDDFactory {
/** Private helper function to create BDD objects. */
private BDDImpl makeBDD(int id) {
- if (USE_FINALIZER) {
- return new BDDImplWithFinalizer(id);
- } else {
return new BDDImpl(id);
}
- }
/** Wrapper for the BDD index number used internally in the representation. */
private class BDDImpl extends BDD {
@@ -407,24 +390,6 @@ public final class JFactory extends BDDFactory {
}
}
- private class BDDImplWithFinalizer extends BDDImpl {
-
- BDDImplWithFinalizer(int id) {
- super(id);
- }
-
- @Override
- protected void finalize() throws Throwable {
- super.finalize();
- if (USE_FINALIZER) {
- if (DEBUG_FINALIZER && _index >= 0) {
- LOGGER.error("BDD not freed! {}", System.identityHashCode(this));
- }
- free();
- }
- }
- }
-
private static final int REF_MASK = 0xFFC00000;
private static final int MARK_MASK = 0x00200000;
private static final int LEV_MASK = 0x001FFFFF;
