predictivesearch/PcsAlgorithm/Algorithm1/src/CPsDataPluginInterface.cpp
branchRCL_3
changeset 6 e8e3147d53eb
parent 0 e686773b3f54
child 12 4ae315f230bc
--- a/predictivesearch/PcsAlgorithm/Algorithm1/src/CPsDataPluginInterface.cpp	Fri Mar 12 15:41:25 2010 +0200
+++ b/predictivesearch/PcsAlgorithm/Algorithm1/src/CPsDataPluginInterface.cpp	Mon Mar 15 12:39:26 2010 +0200
@@ -221,19 +221,20 @@
     PRINT ( _L("Enter CPsDataPluginInterface::GetAllSupportedDataStoresL") );
    
     for ( TInt idx = 0; idx < iPsDataPluginInstances.Count(); idx++ )
-    {   
-       RPointerArray<TDesC> aDataStores;    
-       iPsDataPluginInstances[idx]->GetSupportedDataStoresL(aDataStores);
+    {
+       RPointerArray<TDesC> dataStores;
+       CleanupClosePushL( dataStores );
+       iPsDataPluginInstances[idx]->GetSupportedDataStoresL(dataStores);
        
-       for( TInt i(0); i<aDataStores.Count(); i++)
-       {       	
-	       	if( aDataStores[i]->Compare(aUri) == 0)
+       for ( TInt i(0); i<dataStores.Count(); i++)
+       {
+	       	if ( dataStores[i]->Compare(aUri) == 0)
 	       	{
 	       		iPsDataPluginInstances[idx]->GetSupportedDataFieldsL(aDataFields);
 	       		break;
-	       	}    	
+	       	}
        }
-       aDataStores.Reset();
+       CleanupStack::PopAndDestroy( &dataStores ); // Close
     }
     
     PRINT ( _L("End CPsDataPluginInterface::GetAllSupportedDataStoresL") );