photosgallery/viewframework/visuallistmanager/src/glxvisuallistmanager.cpp
branchRCL_3
changeset 9 6b87b143d312
parent 0 4e91876724a2
equal deleted inserted replaced
5:f7f0874bfe7d 9:6b87b143d312
    67 	TRACER("CGlxVisualListManager::ManagerL");
    67 	TRACER("CGlxVisualListManager::ManagerL");
    68     GLX_LOG_INFO("CGlxVisualListManager::ManagerL");
    68     GLX_LOG_INFO("CGlxVisualListManager::ManagerL");
    69 	CGlxVlmTls* tls = reinterpret_cast<CGlxVlmTls*>(Dll::Tls());
    69 	CGlxVlmTls* tls = reinterpret_cast<CGlxVlmTls*>(Dll::Tls());
    70 
    70 
    71 	// Create tls struct if does not exist
    71 	// Create tls struct if does not exist
    72 	if (tls == NULL) 
    72 	if ( !tls ) 
    73 		{
    73 		{
    74 		// Create list manager instance
    74 		// Create list manager instance
    75 		CGlxVisualListManager* lm = new (ELeave) CGlxVisualListManager();
    75 		CGlxVisualListManager* lm = new (ELeave) CGlxVisualListManager();
    76 		CleanupStack::PushL(lm);
    76 		CleanupStack::PushL(lm);
    77       	tls = new (ELeave) CGlxVlmTls(lm);
    77       	tls = new (ELeave) CGlxVlmTls(lm);
    99     GLX_LOG_INFO("CGlxVisualListManager::Close");
    99     GLX_LOG_INFO("CGlxVisualListManager::Close");
   100 	CGlxVlmTls* tls = reinterpret_cast<CGlxVlmTls*>(Dll::Tls());
   100 	CGlxVlmTls* tls = reinterpret_cast<CGlxVlmTls*>(Dll::Tls());
   101 	__ASSERT_DEBUG(tls != NULL, Panic(EGlxPanicLogicError));
   101 	__ASSERT_DEBUG(tls != NULL, Panic(EGlxPanicLogicError));
   102 	__ASSERT_DEBUG(tls->iReferenceCount > 0, Panic(EGlxPanicLogicError)); // There's nothign to close
   102 	__ASSERT_DEBUG(tls->iReferenceCount > 0, Panic(EGlxPanicLogicError)); // There's nothign to close
   103 
   103 
   104     if (tls != NULL) 
   104     if ( tls ) 
   105     	{
   105     	{
   106 		tls->iReferenceCount--;
   106 		tls->iReferenceCount--;
   107 		
   107 		
   108 		// Delete the tls pointer and list manager instance if this was the 
   108 		// Delete the tls pointer and list manager instance if this was the 
   109 		// last reference
   109 		// last reference
   198 //
   198 //
   199 EXPORT_C void CGlxVisualListManager::ReleaseList(MGlxVisualList* aList)
   199 EXPORT_C void CGlxVisualListManager::ReleaseList(MGlxVisualList* aList)
   200 	{
   200 	{
   201 	TRACER("CGlxVisualListManager::ReleaseList");
   201 	TRACER("CGlxVisualListManager::ReleaseList");
   202     GLX_LOG_INFO("CGlxVisualListManager::ReleaseList");
   202     GLX_LOG_INFO("CGlxVisualListManager::ReleaseList");
   203 	if (aList == NULL) 
   203 	if ( !aList ) 
   204 		{
   204 		{
   205 		return;
   205 		return;
   206 		}
   206 		}
   207 	
   207 	
   208 	TGlxVisualListId id = aList->Id();
   208 	TGlxVisualListId id = aList->Id();