mirror of
https://github.com/Z3Prover/z3
synced 2025-04-26 18:45:33 +00:00
Bugfix for concurrent garbage collection in Java API.
Relates to #205 and #245
This commit is contained in:
parent
2d2ec38541
commit
6263252bf5
2 changed files with 34 additions and 19 deletions
|
@ -43,8 +43,8 @@ public class Z3Object extends IDisposable
|
|||
}
|
||||
|
||||
if (m_ctx != null)
|
||||
{
|
||||
m_ctx.m_refCount--;
|
||||
{
|
||||
m_ctx.m_refCount.decrementAndGet();
|
||||
m_ctx = null;
|
||||
}
|
||||
}
|
||||
|
@ -54,13 +54,13 @@ public class Z3Object extends IDisposable
|
|||
|
||||
Z3Object(Context ctx)
|
||||
{
|
||||
ctx.m_refCount++;
|
||||
ctx.m_refCount.incrementAndGet();
|
||||
m_ctx = ctx;
|
||||
}
|
||||
|
||||
Z3Object(Context ctx, long obj)
|
||||
{
|
||||
ctx.m_refCount++;
|
||||
ctx.m_refCount.incrementAndGet();
|
||||
m_ctx = ctx;
|
||||
incRef(obj);
|
||||
m_n_obj = obj;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue