3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 11:25:51 +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

@ -17,7 +17,7 @@ Notes:
package com.microsoft.z3;
class FixedpointDecRefQueue extends IDecRefQueue
class FixedpointDecRefQueue extends IDecRefQueue<Fixedpoint>
{
public FixedpointDecRefQueue()
{
@ -29,27 +29,10 @@ class FixedpointDecRefQueue extends IDecRefQueue
super(move_limit);
}
@Override
protected void incRef(Context ctx, long obj)
{
try
{
Native.fixedpointIncRef(ctx.nCtx(), obj);
} catch (Z3Exception e)
{
// OK.
}
}
@Override
protected void decRef(Context ctx, long obj)
{
try
{
Native.fixedpointDecRef(ctx.nCtx(), obj);
} catch (Z3Exception e)
{
// OK.
}
Native.fixedpointDecRef(ctx.nCtx(), obj);
}
};