harvester/common/src/harvesterpluginfactory.cpp
changeset 23 33ae025ac1e8
parent 21 50bf9db68373
child 36 aa5a574040a4
--- a/harvester/common/src/harvesterpluginfactory.cpp	Fri Apr 16 15:23:55 2010 +0300
+++ b/harvester/common/src/harvesterpluginfactory.cpp	Mon May 03 12:55:01 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 )