mirror of
https://github.com/Z3Prover/z3
synced 2025-06-13 17:36:15 +00:00
Java API: bugfixes
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
519d308b86
commit
830f6ada93
2 changed files with 3 additions and 7 deletions
|
@ -3083,8 +3083,6 @@ public class Context extends IDisposable
|
||||||
**/
|
**/
|
||||||
protected void finalize()
|
protected void finalize()
|
||||||
{
|
{
|
||||||
// Console.WriteLine("Context Finalizer from " +
|
|
||||||
// System.Threading.Thread.CurrentThread.ManagedThreadId);
|
|
||||||
Dispose();
|
Dispose();
|
||||||
|
|
||||||
if (m_refCount == 0)
|
if (m_refCount == 0)
|
||||||
|
@ -3094,6 +3092,7 @@ public class Context extends IDisposable
|
||||||
m_ctx = 0;
|
m_ctx = 0;
|
||||||
} else
|
} else
|
||||||
/* re-queue the finalizer */
|
/* re-queue the finalizer */
|
||||||
|
/* BUG: DRQ's need to be taken over too! */
|
||||||
new Context(m_ctx, m_refCount, m_n_err_handler);
|
new Context(m_ctx, m_refCount, m_n_err_handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3102,8 +3101,6 @@ public class Context extends IDisposable
|
||||||
**/
|
**/
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
// Console.WriteLine("Context Dispose from " +
|
|
||||||
// System.Threading.Thread.CurrentThread.ManagedThreadId);
|
|
||||||
m_AST_DRQ.Clear(this);
|
m_AST_DRQ.Clear(this);
|
||||||
m_ASTMap_DRQ.Clear(this);
|
m_ASTMap_DRQ.Clear(this);
|
||||||
m_ASTVector_DRQ.Clear(this);
|
m_ASTVector_DRQ.Clear(this);
|
||||||
|
|
|
@ -104,13 +104,12 @@ public class Z3Object extends IDisposable
|
||||||
return null;
|
return null;
|
||||||
long[] an = new long[a.length];
|
long[] an = new long[a.length];
|
||||||
for (int i = 0; i < a.length; i++)
|
for (int i = 0; i < a.length; i++)
|
||||||
if (a[i] != null)
|
an[i] = a[i].NativeObject();
|
||||||
an[i] = a[i].NativeObject();
|
|
||||||
return an;
|
return an;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ArrayLength(Z3Object[] a)
|
static int ArrayLength(Z3Object[] a)
|
||||||
{
|
{
|
||||||
return (a == null) ? 0 : (int) a.length;
|
return (a == null) ? 0 : a.length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue