3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-08-01 16:28:05 +08:00
parent b7a27ca4bd
commit 7f073a0585
4 changed files with 302 additions and 300 deletions

View file

@ -20,6 +20,8 @@ Notes:
#include "util/rational.h"
#include "util/symbol.h"
#include "util/dictionary.h"
#include <thread>
#include <atomic>
params_ref params_ref::g_empty_params_ref;
@ -324,7 +326,7 @@ class params {
};
typedef std::pair<symbol, value> entry;
svector<entry> m_entries;
unsigned m_ref_count;
std::atomic<unsigned> m_ref_count;
void del_value(entry & e);
void del_values();
@ -336,7 +338,9 @@ public:
void inc_ref() { m_ref_count++; }
void dec_ref() {
SASSERT(m_ref_count > 0);
SASSERT(m_ref_count > 0);
if (m_ref_count > 10000)
IF_VERBOSE(0, verbose_stream() << this << " " << m_ref_count << " " << std::this_thread::get_id() << "\n";);
if (--m_ref_count == 0) dealloc(this);
}