mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 03:15:50 +00:00
Java API: split incRef into incRef and addToReferenceQueue
One method should do one thing only, it's easy to mix things up otherwise.
This commit is contained in:
parent
2a347f04bf
commit
22ffd65d1e
20 changed files with 150 additions and 87 deletions
|
@ -20,8 +20,7 @@ package com.microsoft.z3;
|
|||
/**
|
||||
* Objects of this class track statistical information about solvers.
|
||||
**/
|
||||
public class Statistics extends Z3Object
|
||||
{
|
||||
public class Statistics extends Z3Object {
|
||||
/**
|
||||
* Statistical data is organized into pairs of [Key, Entry], where every
|
||||
* Entry is either a {@code DoubleEntry} or a {@code UIntEntry}
|
||||
|
@ -191,8 +190,12 @@ public class Statistics extends Z3Object
|
|||
}
|
||||
|
||||
@Override
|
||||
void incRef(long o) {
|
||||
Native.statsIncRef(getContext().nCtx(), o);
|
||||
void incRef() {
|
||||
getContext().getStatisticsDRQ().storeReference(getContext(), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
void addToReferenceQueue() {
|
||||
Native.statsIncRef(getContext().nCtx(), getNativeObject());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue