From a5ad1097072e63e110c4d72dd9eec15c9a40ec4d Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Sun, 11 Sep 2022 19:06:23 -0700 Subject: [PATCH] suppress debug warnings when concurrent dec-ref is enabled. The contract with the client is that it doesn't invoke methods on auxiliary objects after the context is deleted. The client is not required to decrement reference counts Signed-off-by: Nikolaj Bjorner --- src/api/api_context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/api_context.cpp b/src/api/api_context.cpp index a16341955..6d9af74a0 100644 --- a/src/api/api_context.cpp +++ b/src/api/api_context.cpp @@ -153,7 +153,7 @@ namespace api { flush_objects(); for (auto& kv : m_allocated_objects) { api::object* val = kv.m_value; - DEBUG_CODE(warning_msg("Uncollected memory: %d: %s", kv.m_key, typeid(*val).name());); + DEBUG_CODE(if (!m_concurrent_dec_ref) warning_msg("Uncollected memory: %d: %s", kv.m_key, typeid(*val).name());); dealloc(val); } if (m_params.owns_manager())