harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp
changeset 23 33ae025ac1e8
parent 3 b73a2e62868f
child 25 8e4539ab1889
child 41 2290317b9ec5
--- a/harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp	Fri Apr 16 15:23:55 2010 +0300
+++ b/harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp	Mon May 03 12:55:01 2010 +0300
@@ -31,6 +31,9 @@
 #include <harvesterdata.h>
 #include "harvesterpluginfactory.h"
 
+// for CleanupResetAndDestroyPushL
+#include <mmf/common/mmfcontrollerpluginresolver.h>
+
 _LIT( KBackslash, "\\");
 
 const TInt KEntryBufferSize = 100;
@@ -87,6 +90,9 @@
 		RPointerArray<CPlaceholderData>& aEntryArray )
 	{
 	WRITELOG( "CMmcFileList::BuildFileListL - start" );
+	
+	CleanupResetAndDestroyPushL( aEntryArray );
+	
 	CDesCArrayFlat* path = new(ELeave) CDesCArrayFlat( 10 );
 	CleanupStack::PushL( path );
 	TFileName firstPath;
@@ -180,6 +186,8 @@
 	
 	CleanupStack::PopAndDestroy( path );
 	
+	CleanupStack::Pop( &aEntryArray );
+	
 	WRITELOG( "CMmcFileList::BuildFileListL - end" );
 	}