mpx/collectionframework/collectionengine/src/mpxcollectioncache.cpp
changeset 48 b7b49303d0c0
parent 3 b425f12f328d
child 56 63223d4fd956
--- a/mpx/collectionframework/collectionengine/src/mpxcollectioncache.cpp	Fri Jul 09 17:03:16 2010 -0500
+++ b/mpx/collectionframework/collectionengine/src/mpxcollectioncache.cpp	Fri Jul 23 17:48:16 2010 -0500
@@ -28,6 +28,7 @@
 #include <mpxcollectionopenlresultdef.h>
 #include <mpxlog.h>
 #include "mpxcollectioncache.h"
+#include <mmf/common/mmfcontrollerpluginresolver.h>
 
 // CONSTANTS
 const TInt KMPXRootNodeId = 0;
@@ -589,6 +590,7 @@
 void CMPXCollectionCacheNode::HandleChangeL( TMPXItemId aChangeItemId, 
                                 RPointerArray<CMPXCollectionCacheNode>& aArray )
     {
+    CleanupResetAndDestroyPushL(aArray); 
     // This node is affected
     // All child nodes are invalid!
     //
@@ -647,6 +649,7 @@
                 } // for
             } // if iResults
         } // if no children
+    CleanupStack::Pop(&aArray); 
     }
     
 // ----------------------------------------------------------------------------
@@ -827,6 +830,7 @@
     // O(n^2) complexity here is OK, Merging keeps the number of items 
     // very small. Less than 3 items are alive at a time
     //
+    CleanupClosePushL( aArray );
     RArray<TMPXOpenDataBlock> newArray;
     CleanupClosePushL( newArray );
     
@@ -869,6 +873,7 @@
         MPX_DEBUG3("Order: %i %i", newArray[i].iOffset, newArray[i].iSize );
         }
     CleanupStack::PopAndDestroy( &newArray );
+    CleanupStack::Pop(); 
     }
                                  
 #ifdef _DEBUG