msg_close_msg_handle(&__msgHandle);
__msgHandle = 0;
}
+
+ Tizen::Base::Collection::IList* pKeyList = null;
+ Integer* pKey = null;
+ Integer* pMsgType = null;
+ IEnumerator* pValueEnum = null;
+ int count = 0;
+
+ __msgMutex.Acquire();
+
+ if (__messageMap.GetCount())
+ {
+ pKeyList = __messageMap.GetKeysN();
+ count = pKeyList->GetCount();
+ }
+
+ // Manually deleting key and value pairs
+ for (int index = 0; index < count; index++)
+ {
+ pKey = static_cast <Integer*>(pKeyList->GetAt(index));
+ pValueEnum = __messageMap.GetValuesN(*pKey);
+
+ if (pValueEnum)
+ {
+ if (pValueEnum->MoveNext() == E_SUCCESS)
+ {
+ pMsgType = static_cast <Integer*>(pValueEnum->GetCurrent());
+
+ if (pMsgType)
+ {
+ delete pMsgType;
+ pMsgType = null;
+ }
+ }
+ }
- if (__messageMap.GetCount())
+ if (pKey)
+ {
+ delete pKey;
+ pKey = null;
+ }
+
+ if (pValueEnum)
+ {
+ delete pValueEnum;
+ pValueEnum = null;
+ }
+ }
+
+ if (pKeyList)
+ {
+ delete pKeyList;
+ pKeyList = null;
+ }
+
+ if (__messageMap.GetCount())
{
- __messageMap.RemoveAll(true);
+ __messageMap.RemoveAll(false);
}
+ __msgMutex.Release();
+
if (__cbsSettingsHandle)
{
msg_release_struct(&__cbsSettingsHandle);