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:
parent
dfc80d3b69
commit
495ef0f055
48 changed files with 368 additions and 939 deletions
|
@ -17,7 +17,7 @@ Notes:
|
|||
|
||||
package com.microsoft.z3;
|
||||
|
||||
class SolverDecRefQueue extends IDecRefQueue
|
||||
class SolverDecRefQueue extends IDecRefQueue<Solver>
|
||||
{
|
||||
public SolverDecRefQueue() { super(); }
|
||||
|
||||
|
@ -27,26 +27,7 @@ class SolverDecRefQueue extends IDecRefQueue
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void incRef(Context ctx, long obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
Native.solverIncRef(ctx.nCtx(), obj);
|
||||
} catch (Z3Exception e)
|
||||
{
|
||||
// OK.
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void decRef(Context ctx, long obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
Native.solverDecRef(ctx.nCtx(), obj);
|
||||
} catch (Z3Exception e)
|
||||
{
|
||||
// OK.
|
||||
}
|
||||
protected void decRef(Context ctx, long obj) {
|
||||
Native.solverDecRef(ctx.nCtx(), obj);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue