presencecache/presencecacheutils/src/presenceobjecthelpers.cpp
branchRCL_3
changeset 32 2828b4d142c0
parent 0 e686773b3f54
child 64 c1e8ba0c2b16
--- a/presencecache/presencecacheutils/src/presenceobjecthelpers.cpp	Tue Apr 27 16:23:35 2010 +0300
+++ b/presencecache/presencecacheutils/src/presenceobjecthelpers.cpp	Tue May 11 16:00:21 2010 +0300
@@ -64,6 +64,7 @@
 //
 EXPORT_C void TPresenceArrayPacker::UnPackArrayL( RPointerArray< MPresenceBuddyInfo2 >& aBufferArray, const TDesC8& aPack  )
     {
+    CleanupResetAndDestroyPushL( aBufferArray );
 	// No reset
     if ( ! aPack.Length() )
         {
@@ -85,10 +86,10 @@
         info = MPresenceBuddyInfo2::NewLC();
         info->InternalizeL( rs );
         aBufferArray.AppendL( info );
-        
+        CleanupStack::Pop();
 		}
-    CleanupStack::Pop( objCount ); // all the objects
     CleanupStack::PopAndDestroy(); // rs    
+    CleanupStack::Pop( &aBufferArray );
     }