emailuis/emailui/src/FreestyleEmailUiCLSListsHandler.cpp
branchRCL_3
changeset 19 b13141f05c3d
parent 8 e1b6206813b4
child 29 6b8f3b30d0ec
--- a/emailuis/emailui/src/FreestyleEmailUiCLSListsHandler.cpp	Wed Apr 14 15:42:15 2010 +0300
+++ b/emailuis/emailui/src/FreestyleEmailUiCLSListsHandler.cpp	Tue Apr 27 16:20:14 2010 +0300
@@ -120,12 +120,13 @@
 			}
 		}
 		
-	RPointerArray<CFSEmailUiClsItem> allMatches = ConstructOneListL( iMatchingCompleteContacts,
+    RPointerArray<CFSEmailUiClsItem> allMatches = ConstructOneListL( iMatchingCompleteContacts,
                                                                       iMatchingMRUContacts,
                                                                       iMatchingMissingEmailContacts );
-	iClsListObserver->ArrayUpdatedL( allMatches );
-	allMatches.ResetAndDestroy();
-	}
+    CleanupResetAndDestroyClosePushL( allMatches ); // Ownership is taken
+    iClsListObserver->ArrayUpdatedL( allMatches ); 
+    CleanupStack::PopAndDestroy(&allMatches ); // Array is released, destructors are called 
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiClsListsHandler::InputModeChangedL