3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 03:15:50 +00:00

Java bindings with no finalizers

Replacing finalizers with PhantomReferences, required quite a lot of
changes to the codebase.
This commit is contained in:
George Karpenkov 2016-06-12 14:18:13 +02:00
parent dfc80d3b69
commit 495ef0f055
48 changed files with 368 additions and 939 deletions

View file

@ -190,15 +190,9 @@ public class Statistics extends Z3Object
super(ctx, obj);
}
void incRef(long o)
{
getContext().getStatisticsDRQ().incAndClear(getContext(), o);
super.incRef(o);
}
void decRef(long o)
{
getContext().getStatisticsDRQ().add(o);
super.decRef(o);
@Override
void incRef(long o) {
Native.statsIncRef(getContext().nCtx(), o);
getContext().getStatisticsDRQ().storeReference(getContext(), this);
}
}