check instance counters in cleanup_for_valgrind()

This commit is contained in:
Michael Davidsaver
2020-04-05 08:58:10 -07:00
parent d852758b7b
commit 7a2ab35439
7 changed files with 39 additions and 25 deletions
+2 -9
View File
@@ -49,21 +49,13 @@ unsigned long version_int()
return PVXS_VERSION;
}
void cleanup_for_valgrind()
{
#if LIBEVENT_VERSION_NUMBER >= 0x02010000
libevent_global_shutdown();
#endif
impl::logger_shutdown();
impl::UDPManager::cleanup();
}
#define CASE(KLASS) std::atomic<size_t> cnt_ ## KLASS{}
CASE(StructTop);
CASE(UDPListener);
CASE(evbase);
CASE(GPROp);
CASE(Connection);
@@ -99,6 +91,7 @@ std::map<std::string, size_t> instanceSnapshot()
CASE(StructTop);
CASE(UDPListener);
CASE(evbase);
CASE(GPROp);
CASE(Connection);