summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Linke <christian.linke@bmw.de>2015-12-15 11:36:58 +0000
committerChristian Linke <christian.linke@bmw.de>2015-12-15 11:36:58 +0000
commit42d9413478b8a853aa7d52d3f54f608a932cf49a (patch)
tree48dc3dcf3c8be77cee05bc447784156828093dba
parentbb3243b03c00242a1e35c59980f64b339b7dc7a6 (diff)
downloadaudiomanager-42d9413478b8a853aa7d52d3f54f608a932cf49a.tar.gz
forgot to destroy the single instance in destructor
Signed-off-by: Christian Linke <christian.linke@bmw.de>
-rw-r--r--AudioManagerUtilities/src/CAmCommonAPIWrapper.cpp11
1 files changed, 11 insertions, 0 deletions
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)