harvester/common/src/harvesterpluginfactory.cpp
branchRCL_3
changeset 10 ab88d4a85041
parent 7 3cebc1a84278
child 18 63c982fb92f2
--- a/harvester/common/src/harvesterpluginfactory.cpp	Wed Apr 14 16:24:03 2010 +0300
+++ b/harvester/common/src/harvesterpluginfactory.cpp	Tue Apr 27 17:05:23 2010 +0300
@@ -28,6 +28,9 @@
 #include "mdsutils.h"
 #include "harvesterlog.h"
 
+// for CleanupResetAndDestroyPushL
+#include <mmf/common/mmfcontrollerpluginresolver.h>
+
 const TInt KCacheItemCountForEventCaching = 1;
 
 // ---------------------------------------------------------------------------
@@ -36,7 +39,7 @@
 //
 CHarvesterPluginFactory::CHarvesterPluginFactory() :
     iBlacklist( NULL ),
-    iHarvesting( NULL ),
+    iHarvesting( EFalse ),
     iHarvesterEventManager( NULL )
 	{
 	WRITELOG( "CHarvesterPluginFactory::CHarvesterPluginFactory()" );
@@ -338,6 +341,8 @@
 void CHarvesterPluginFactory::GetSupportedPluginsL(
 		RPointerArray<CHarvesterPluginInfo>& aSupportedPlugins, const TDesC& aExt )
 	{
+    CleanupResetAndDestroyPushL( aSupportedPlugins );
+    
 	const TInt pluginInfoCount = iHarvesterPluginInfoArray.Count();
 	TInt extCount = 0;
 	for ( TInt i = pluginInfoCount; --i >= 0; )
@@ -358,6 +363,8 @@
                 }
             }
         }	
+	
+	CleanupStack::Pop( &aSupportedPlugins );
 	}
 
 EXPORT_C TBool CHarvesterPluginFactory::IsSupportedFileExtension( const TDesC& aFileName )