3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-08 07:03:23 +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

@ -127,13 +127,13 @@ public class Solver extends Z3Object
* using the Boolean constants in ps.
*
* Remarks:
* This API is an alternative to {@link check} with assumptions for
* This API is an alternative to {@link #check()} with assumptions for
* extracting unsat cores.
* Both APIs can be used in the same solver. The unsat core will contain a
* combination
* of the Boolean variables provided using {@link assertAndTrack}
* of the Boolean variables provided using {@code #assertAndTrack}
* and the Boolean literals
* provided using {@link check} with assumptions.
* provided using {@link #check()} with assumptions.
**/
public void assertAndTrack(BoolExpr[] constraints, BoolExpr[] ps)
{
@ -333,16 +333,8 @@ public class Solver extends Z3Object
}
@Override
void incRef(long o)
{
getContext().getSolverDRQ().incAndClear(getContext(), o);
super.incRef(o);
}
@Override
void decRef(long o)
{
getContext().getSolverDRQ().add(o);
super.decRef(o);
void incRef(long o) {
Native.solverIncRef(getContext().nCtx(), o);
getContext().getSolverDRQ().storeReference(getContext(), this);
}
}