3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-22 23:14:01 +00:00
z3/src/api/java/GoalDecRefQueue.java
Christoph M. Wintersteiger d7a62baef4 Improved memory use of the Java API. Thanks to Joerg Pfaehler for reporting this issue!
+ formatting

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2015-01-30 21:10:22 -06:00

53 lines
814 B
Java

/**
Copyright (c) 2012-2014 Microsoft Corporation
Module Name:
GoalDecRefQueue.java
Abstract:
Author:
@author Christoph Wintersteiger (cwinter) 2012-03-15
Notes:
**/
package com.microsoft.z3;
class GoalDecRefQueue extends IDecRefQueue
{
public GoalDecRefQueue()
{
super();
}
public GoalDecRefQueue(int move_limit)
{
super(move_limit);
}
protected void incRef(Context ctx, long obj)
{
try
{
Native.goalIncRef(ctx.nCtx(), obj);
} catch (Z3Exception e)
{
// OK.
}
}
protected void decRef(Context ctx, long obj)
{
try
{
Native.goalDecRef(ctx.nCtx(), obj);
} catch (Z3Exception e)
{
// OK.
}
}
};