bdd.registerGCCallback(this, m);
try { bdd.registerGCCallback(this, m); } catch (UnsupportedOperationException _) { System.err.println("Warning: "+bdd.getVersion()+" does not support callbacks"); continue; }
    public void testGCCallback() {        reset();        Method m;        try {            m = CallbackTests.class.getDeclaredMethod("my_gc_callback",                new Class[] { int.class, BDDFactory.GCStats.class });        } catch (SecurityException e) {            Assert.fail(e.toString());            return;        } catch (NoSuchMethodException e) {            Assert.fail(e.toString());            return;        }        Assert.assertTrue(hasNext());        while (hasNext()) {            BDDFactory bdd = nextFactory();            bdd.registerGCCallback(this, m);            gc_called = 0;            final int numBits = 20;            final int max = (1 << numBits) - 1;            if (bdd.varNum() < numBits) bdd.setVarNum(numBits);            int[] vars = new int[numBits];            for (int i = 0; i < numBits; ++i) {                vars[i] = i;            }            for (int i = 0; i < max; ++i) {                if (gc_called > 1) break;                BDD v = bdd.buildCube(i, vars);                v.free();            }            Assert.assertTrue(gc_called > 0);            bdd.unregisterGCCallback(this, m);        }    }