From 42d9413478b8a853aa7d52d3f54f608a932cf49a Mon Sep 17 00:00:00 2001 From: Christian Linke Date: Tue, 15 Dec 2015 11:36:58 +0000 Subject: forgot to destroy the single instance in destructor Signed-off-by: Christian Linke --- AudioManagerUtilities/src/CAmCommonAPIWrapper.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/AudioManagerUtilities/src/CAmCommonAPIWrapper.cpp b/AudioManagerUtilities/src/CAmCommonAPIWrapper.cpp index 6e0cb90..e756c19 100644 --- a/AudioManagerUtilities/src/CAmCommonAPIWrapper.cpp +++ b/AudioManagerUtilities/src/CAmCommonAPIWrapper.cpp @@ -80,6 +80,17 @@ CAmCommonAPIWrapper::~CAmCommonAPIWrapper() mContext.reset(); mpSocketHandler = NULL; mWatchToCheck = NULL; + try + { + if (pSingleCommonAPIInstance!=NULL) + delete pSingleCommonAPIInstance; + + pSingleCommonAPIInstance=NULL; + } + catch(...) + { + logError(__PRETTY_FUNCTION__,"error while deleting CAPIWrapper instance"); + } } CAmCommonAPIWrapper* CAmCommonAPIWrapper::instantiateOnce(CAmSocketHandler* socketHandler, const std::string & applicationName) -- cgit v1.2.1