--- a/metadataengine/client/src/mdesessionimpl.cpp Wed Apr 14 16:24:03 2010 +0300
+++ b/metadataengine/client/src/mdesessionimpl.cpp Tue Apr 27 17:05:23 2010 +0300
@@ -42,6 +42,9 @@
#include "mdeobjectcondition.h"
#include "mdscommoninternal.h"
+// for CleanupResetAndDestroyPushL
+#include <mmf/common/mmfcontrollerpluginresolver.h>
+
RMdESessionAsyncRequest::RMdESessionAsyncRequest( TRequestType aRequestType,
CMdCSerializationBuffer* aBuffer, CMdCSerializationBuffer& aResultBuffer,
TRequestStatus& aRequestStatus) :
@@ -1840,6 +1843,8 @@
CMdCSerializationBuffer& aBuffer,
RPointerArray<CMdEInstanceItem>& aItems )
{
+ CleanupResetAndDestroyPushL( aItems );
+
const TMdCItems& items = TMdCItems::GetFromBufferL( aBuffer );
CMdENamespaceDef& namespaceDef = GetNamespaceDefL( items.iNamespaceDefId );
@@ -1881,6 +1886,8 @@
CleanupStack::Pop( relation );
}
}
+
+ CleanupStack::Pop( &aItems );
}
TItemId CMdESessionImpl::AddObjectL( CMdEObject& aObject )
@@ -2527,7 +2534,6 @@
&aObserver, *namespaceDef );
if ( index != KErrNotFound )
{
- iNotifiers[index]->Cancel();
delete iNotifiers[index];
iNotifiers[index] = NULL;
iNotifiers.Remove( index );
@@ -2549,7 +2555,6 @@
&aObserver, namespaceDef );
if ( index != KErrNotFound )
{
- iNotifiers[index]->Cancel();
delete iNotifiers[index];
iNotifiers[index] = NULL;
iNotifiers.Remove( index );
@@ -2580,7 +2585,6 @@
&aObserver, *namespaceDef );
if ( index != KErrNotFound )
{
- iNotifiers[index]->Cancel();
delete iNotifiers[index];
iNotifiers[index] = NULL;
iNotifiers.Remove( index );
@@ -2612,7 +2616,6 @@
&aObserver, *namespaceDef );
if ( index != KErrNotFound )
{
- iNotifiers[index]->Cancel();
delete iNotifiers[index];
iNotifiers[index] = NULL;
iNotifiers.Remove( index );
@@ -2634,7 +2637,6 @@
&aObserver, namespaceDef );
if ( index != KErrNotFound )
{
- iNotifiers[index]->Cancel();
delete iNotifiers[index];
iNotifiers[index] = NULL;
iNotifiers.Remove( index );
@@ -2664,7 +2666,6 @@
&aObserver, *namespaceDef );
if ( index != KErrNotFound )
{
- iNotifiers[index]->Cancel();
delete iNotifiers[index];
iNotifiers[index] = NULL;
iNotifiers.Remove( index );
@@ -2891,6 +2892,8 @@
void CMdESessionImpl::GetItemIdL( CMdCSerializationBuffer* aBuffer,
RArray<TItemId>& aIdArray )
{
+ CleanupClosePushL( aIdArray );
+
const TMdCItemIds& itemIds = TMdCItemIds::GetFromBufferL( *aBuffer );
if( itemIds.iObjectIds.iPtr.iCount > 0 )
@@ -2917,6 +2920,8 @@
aBuffer->ReceiveL( id );
aIdArray.AppendL( id );
}
+
+ CleanupStack::Pop( &aIdArray );
}
void CMdESessionImpl::GetDistinctValuesL( CMdCSerializationBuffer& aBuffer,
@@ -3021,7 +3026,6 @@
&aObserver, *namespaceDef );
if ( index != KErrNotFound )
{
- iNotifiers[index]->Cancel();
delete iNotifiers[index];
iNotifiers[index] = NULL;
iNotifiers.Remove( index );