mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 10:55:50 +00:00
adding support for distinct for dt2bv, re-entry harness for ~Context
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
375682e98d
commit
5f5ef8b38d
2 changed files with 20 additions and 2 deletions
|
@ -4940,11 +4940,12 @@ namespace Microsoft.Z3
|
|||
// Console.WriteLine("Context Finalizer from " + System.Threading.Thread.CurrentThread.ManagedThreadId);
|
||||
Dispose();
|
||||
|
||||
if (refCount == 0)
|
||||
if (refCount == 0 && m_ctx != IntPtr.Zero)
|
||||
{
|
||||
m_n_err_handler = null;
|
||||
Native.Z3_del_context(m_ctx);
|
||||
IntPtr ctx = m_ctx;
|
||||
m_ctx = IntPtr.Zero;
|
||||
Native.Z3_del_context(ctx);
|
||||
}
|
||||
else
|
||||
GC.ReRegisterForFinalize(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue