webengine/widgetregistry/Server/src/WidgetRegistry.cpp
branchRCL_3
changeset 58 220a17280356
parent 37 cb62a4f66ebe
child 59 1f3c3f2f5b0a
equal deleted inserted replaced
46:ea4b2e4f7cac 58:220a17280356
   774             if ( NULL != res )
   774             if ( NULL != res )
   775                 {
   775                 {
   776                 TRAP( error, InsertL( entry ) );
   776                 TRAP( error, InsertL( entry ) );
   777                 if ( KErrNone != error )
   777                 if ( KErrNone != error )
   778                     {
   778                     {
   779                     CleanupStack::PopAndDestroy( entry );
   779                      delete entry; 
   780                     }
   780                     }
   781                 else
   781                 else
   782                     {
   782                     {
   783                     __ASSERT_DEBUG( res == entry, User::Invariant() );
   783                     __ASSERT_DEBUG( res == entry, User::Invariant() );
   784                     // Entry was inserted successfully.
   784                     // Entry was inserted successfully.
   785                     CleanupStack::Pop( entry );
   785                     //CleanupStack::Pop( entry );
   786                     // add uid to AppArchList if not there,
   786                     // add uid to AppArchList if not there,
   787                     // this can happend due to UID
   787                     // this can happend due to UID
   788                     // reallocation for UID collision resolution
   788                     // reallocation for UID collision resolution
   789                     TInt uidInt = (*entry)[EUid];
   789                     TInt uidInt = (*entry)[EUid];
   790                     if ( aDoConsistency &&
   790                     if ( aDoConsistency &&
   800                 }
   800                 }
   801             else
   801             else
   802                 {
   802                 {
   803                 // Pop and delete the un-needed entry so it is not left behind.
   803                 // Pop and delete the un-needed entry so it is not left behind.
   804                 errorCount++; 
   804                 errorCount++; 
   805                 CleanupStack::PopAndDestroy( entry );                
       
   806                 }
   805                 }
   807             }
   806             }
   808         else
   807         else
   809             {
   808             {
   810             // entry error
   809             // entry error
   811             CleanupStack::PopAndDestroy( entry );
   810             delete entry; 
   812             }
   811             }
       
   812         CleanupStack::Pop(); //entry
   813         } // for
   813         } // for
   814 
   814 
   815     CleanupStack::PopAndDestroy( 2, &file ); // readStream, file
   815     CleanupStack::PopAndDestroy( 2, &file ); // readStream, file
   816     if ( errorCount != 0 )
   816     if ( errorCount != 0 )
   817         {
   817         {