clfwrapper/ClientSrc/CCLFItemListModelImpl.cpp
branchRCL_3
changeset 22 ab88d4a85041
parent 15 3cebc1a84278
child 40 910a23996aa0
--- a/clfwrapper/ClientSrc/CCLFItemListModelImpl.cpp	Wed Apr 14 16:24:03 2010 +0300
+++ b/clfwrapper/ClientSrc/CCLFItemListModelImpl.cpp	Tue Apr 27 17:05:23 2010 +0300
@@ -29,6 +29,9 @@
 #include    <collate.h>
 #include    "MGDebugPrint.h"
 
+// for CleanupResetAndDestroyPushL
+#include <mmf/common/mmfcontrollerpluginresolver.h>
+
 // CONSTANTS
 const TInt KCLFResourceVersionNumber( 1 );
 const TInt KCLFEmptyArrayGranularity( 1 );
@@ -443,10 +446,12 @@
 void CCLFItemListModelImpl::CopyArrayL( const TArray<MCLFItem*>& aSource,
                                         RPointerArray<MCLFItem>& aDest )
     {
+    CleanupResetAndDestroyPushL( aDest );
     for( TInt i = aSource.Count() - 1; i >=0; i--)
         {
         aDest.AppendL( aSource[i] );
         }
+    CleanupStack::Pop( &aDest );
     }
 
 // -----------------------------------------------------------------------------