From af7119a078806e9d97a6e4ea4bc7fb2a5dc8f077 Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Thu, 27 Sep 2018 15:04:12 -0700 Subject: [PATCH] add missing MDAPI cleanup call (#45) --- Src/intercept.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Src/intercept.cpp b/Src/intercept.cpp index 4f41990a..8e8a1a81 100644 --- a/Src/intercept.cpp +++ b/Src/intercept.cpp @@ -178,6 +178,13 @@ CLIntercept::~CLIntercept() // the process is terminating, that's probably OK. m_Dispatch = dummyDispatch; +#if defined(USE_MDAPI) + if( m_pMDHelper ) + { + MetricsDiscovery::MDHelper::Delete( m_pMDHelper ); + } +#endif + if( m_OpenCLLibraryHandle != NULL ) { OS().UnloadLibrary( m_OpenCLLibraryHandle );