diff -r 36d60d12b4af -r 819e59dfc032 perfapps/memspyui/ui/avkon/src/MemSpyViewThreads.cpp --- a/perfapps/memspyui/ui/avkon/src/MemSpyViewThreads.cpp Fri Sep 17 14:22:55 2010 +0300 +++ b/perfapps/memspyui/ui/avkon/src/MemSpyViewThreads.cpp Mon Oct 04 10:09:02 2010 +0300 @@ -46,17 +46,25 @@ CMemSpyViewThreads::~CMemSpyViewThreads() { - iThreads.Reset(); + iThreads.ResetAndDestroy(); } void CMemSpyViewThreads::ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune ) { - TInt error = KErrNone; - TRAP( error, iMemSpySession.GetThreadsL( iParentProcessId, iThreads ) ); + TInt error = KErrNone; + RArray threads; + TRAP( error, iMemSpySession.GetThreadsL( iParentProcessId, threads ) ); if( error == KErrNone ) { + CleanupClosePushL( threads ); + for (TInt i=0; i threads; + iMemSpySession.GetThreadsL( iParentProcessId, threads ); + CleanupClosePushL( threads ); + iThreads.ResetAndDestroy(); + for (TInt i=0; iThreadPriority() ); - iModel->AppendL( tempNamePtr ); + model->AppendL( tempNamePtr ); CleanupStack::PopAndDestroy( tempName ); } CAknSettingStyleListBox* listbox = static_cast< CAknSettingStyleListBox* >( iListBox ); - listbox->Model()->SetItemTextArray( iModel ); - listbox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray ); + listbox->Model()->SetItemTextArray( model ); + listbox->Model()->SetOwnershipType( ELbmOwnsItemArray ); + + CleanupStack::Pop( model ); }