stif/TestServer/src/Testserversession.cpp
branchRCL_3
changeset 9 7e287c5c61f0
parent 7 8a14024f954a
child 10 381827f66490
equal deleted inserted replaced
8:cfe32394fcd5 9:7e287c5c61f0
   356     // CTestExecution that handles test case have been created.
   356     // CTestExecution that handles test case have been created.
   357     if( iTestExecutionHandle )
   357     if( iTestExecutionHandle )
   358         {
   358         {
   359         TInt handle = 0;
   359         TInt handle = 0;
   360         CObject* theObj = NULL;
   360         CObject* theObj = NULL;
   361         TInt count = iTestExecutionHandle->Count();
   361         TInt count = iTestExecutionHandle->Count();        
   362             
   362         for ( TInt i = count - 1; i >= 0; i-- )
   363         for( TInt i = 0 ; i < count; i++ )
       
   364             {
   363             {
   365             theObj=iTestExecutionHandle->operator[]( i );
   364             theObj=iTestExecutionHandle->operator[]( i );
   366             if( theObj )
   365             if( theObj )
   367                 {
   366                 {
   368                 handle=iTestExecutionHandle->At( theObj );
   367                 handle=iTestExecutionHandle->At( theObj );
   372                 }
   371                 }
   373             }
   372             }
   374 
   373 
   375         delete iTestExecutionHandle;
   374         delete iTestExecutionHandle;
   376         iTestExecutionHandle = NULL;
   375         iTestExecutionHandle = NULL;
   377 
       
   378         }
   376         }
   379 
   377 
   380     // Deletion must be done here, because the "CloseSession" message is 
   378     // Deletion must be done here, because the "CloseSession" message is 
   381     // completed before execution continues from CActiveScheduler::Start 
   379     // completed before execution continues from CActiveScheduler::Start 
   382     // location, and the main thread can continue execution 
   380     // location, and the main thread can continue execution