3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

Java API: bugfixes

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
Christoph M. Wintersteiger 2012-11-28 17:35:07 +00:00
parent 519d308b86
commit 830f6ada93
2 changed files with 3 additions and 7 deletions

View file

@ -3083,8 +3083,6 @@ public class Context extends IDisposable
**/
protected void finalize()
{
// Console.WriteLine("Context Finalizer from " +
// System.Threading.Thread.CurrentThread.ManagedThreadId);
Dispose();
if (m_refCount == 0)
@ -3094,6 +3092,7 @@ public class Context extends IDisposable
m_ctx = 0;
} else
/* re-queue the finalizer */
/* BUG: DRQ's need to be taken over too! */
new Context(m_ctx, m_refCount, m_n_err_handler);
}
@ -3102,8 +3101,6 @@ public class Context extends IDisposable
**/
public void Dispose()
{
// Console.WriteLine("Context Dispose from " +
// System.Threading.Thread.CurrentThread.ManagedThreadId);
m_AST_DRQ.Clear(this);
m_ASTMap_DRQ.Clear(this);
m_ASTVector_DRQ.Clear(this);

View file

@ -104,13 +104,12 @@ public class Z3Object extends IDisposable
return null;
long[] an = new long[a.length];
for (int i = 0; i < a.length; i++)
if (a[i] != null)
an[i] = a[i].NativeObject();
an[i] = a[i].NativeObject();
return an;
}
static int ArrayLength(Z3Object[] a)
{
return (a == null) ? 0 : (int) a.length;
return (a == null) ? 0 : a.length;
}
}