diff -r 0d28c1c5b6dd -r 2828b4d142c0 phonebookengines/VirtualPhonebook/VPbkSimStore/src/CFindView.cpp --- a/phonebookengines/VirtualPhonebook/VPbkSimStore/src/CFindView.cpp Tue Apr 27 16:23:35 2010 +0300 +++ b/phonebookengines/VirtualPhonebook/VPbkSimStore/src/CFindView.cpp Tue May 11 16:00:21 2010 +0300 @@ -183,6 +183,7 @@ // void CFindView::MatchL( RPointerArray& aMatchedContacts ) { + CleanupResetAndDestroyPushL( aMatchedContacts ); if (iAlwaysIncluded.Count() == 0) { // No always included contacts. The match can be done using @@ -232,6 +233,7 @@ // Free the memory iSIMMatchedContacts.Reset(); + CleanupStack::Pop( &aMatchedContacts ); } // -------------------------------------------------------------------------- @@ -307,6 +309,7 @@ const MVPbkContactLink& /*aContactLink*/, RPointerArray& aMatchedContacts ) { + CleanupResetAndDestroyPushL( aMatchedContacts ); if ( &iParentView == &aView ) { const CViewContact& viewContact = static_cast( @@ -363,6 +366,7 @@ } } } + CleanupStack::Pop( &aMatchedContacts ); } // -------------------------------------------------------------------------- @@ -407,6 +411,7 @@ void CFindView::MatchContactL( const CViewContact& aViewContact, RPointerArray& aMatchedContacts ) { + CleanupResetAndDestroyPushL( aMatchedContacts ); // aContact matches if it's one of the always included contacts OR // (if it's one of Contacts Model matched contacts AND it also // passes our own match). @@ -445,6 +450,7 @@ CleanupStack::Pop( cnt ); } } + CleanupStack::Pop( &aMatchedContacts ); } // --------------------------------------------------------------------------