mmappcomponents/collectionhelper/src/mpxcollectionuihelperimp.cpp
changeset 20 b1fb57be53fe
parent 2 7a9a8e73f54b
child 25 d881023c13eb
--- 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<CMPXCollectionUiHelperImp*>(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<CMPXCollectionUiHelperImp*>( Dll::Tls() );
-        if ( s )
-            {
-            if ( s == this )
-                {
-                delete this;
-                Dll::SetTls( NULL );
-                }
-            }
-        }
+    delete this;
     }
 
 // ---------------------------------------------------------------------------