diff -r d45095c2f4f3 -r b1fb57be53fe mmappcomponents/collectionhelper/src/mpxcollectionuihelperimp.cpp --- a/mmappcomponents/collectionhelper/src/mpxcollectionuihelperimp.cpp Tue Feb 02 00:27:58 2010 +0200 +++ b/mmappcomponents/collectionhelper/src/mpxcollectionuihelperimp.cpp Fri Mar 19 09:38:24 2010 +0200 @@ -82,8 +82,6 @@ iChunkNumber = 0; iChunkSize = 0; iArrayIndex = 0; - iRefCount = 1; - } @@ -105,34 +103,10 @@ // CMPXCollectionUiHelperImp* CMPXCollectionUiHelperImp::NewLC(const TUid& aModeId) { - - CMPXCollectionUiHelperImp* self(NULL); - - if ( aModeId == KMcModeDefault ) - { - self = reinterpret_cast(Dll::Tls()); - if ( !self ) - { - self = new( ELeave ) CMPXCollectionUiHelperImp(); - CleanupStack::PushL( self ); - self->ConstructL(aModeId); - Dll::SetTls( self ); - } - else - { - self->iRefCount++; - CleanupStack::PushL( self ); - } - - return self; - } - else - { - self = new( ELeave ) CMPXCollectionUiHelperImp(); - CleanupStack::PushL( self ); - self->ConstructL(aModeId); - return self; - } + CMPXCollectionUiHelperImp* self = new( ELeave ) CMPXCollectionUiHelperImp(); + CleanupStack::PushL( self ); + self->ConstructL(aModeId); + return self; } // --------------------------------------------------------------------------- @@ -1042,21 +1016,7 @@ // void CMPXCollectionUiHelperImp::Close() { - - ASSERT( iRefCount > 0 ); - if ( --iRefCount == 0 ) - { - // last client released - CMPXCollectionUiHelperImp* s = reinterpret_cast( Dll::Tls() ); - if ( s ) - { - if ( s == this ) - { - delete this; - Dll::SetTls( NULL ); - } - } - } + delete this; } // ---------------------------------------------------------------------------