3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-07 15:55:46 +00:00

Implement RCF external C API

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-01-06 20:06:27 -08:00
parent f1d47f35b2
commit 9fbbdb56e4
6 changed files with 155 additions and 31 deletions

View file

@ -37,6 +37,7 @@ namespace api {
public:
object():m_ref_count(0) {}
virtual ~object() {}
unsigned ref_count() const { return m_ref_count; }
void inc_ref() { m_ref_count++; }
void dec_ref() { SASSERT(m_ref_count > 0); m_ref_count--; if (m_ref_count == 0) dealloc(this); }
};