fbs/fontandbitmapserver/sfbs/FBSCLI.CPP
changeset 183 6a1564a2f3e6
parent 168 2bd88482bfe5
equal deleted inserted replaced
168:2bd88482bfe5 183:6a1564a2f3e6
   103 		}
   103 		}
   104 	}
   104 	}
   105 
   105 
   106 CFbClient::~CFbClient()
   106 CFbClient::~CFbClient()
   107 	{
   107 	{
       
   108     FBS_OST( OstTraceExt2( GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, CFBCLIENT_DESTRUCTOR_INFO, "# Server session destroyed; rc=%d; iSSH=0x%08x;", iResourceCount, iSessionHandle);)
   108 	/*
   109 	/*
   109 	Don't call any CFontStore functions if CFbClient::NewL has left, or if FBSERV has already deleted the
   110 	Don't call any CFontStore functions if CFbClient::NewL has left, or if FBSERV has already deleted the
   110 	font store, which happens in test programs like TFBS when FBSERV is closed before the client(s).
   111 	font store, which happens in test programs like TFBS when FBSERV is closed before the client(s).
   111 	*/
   112 	*/
   112 	CFontStore* font_store = NULL;
   113 	CFontStore* font_store = NULL;
   115 		{
   116 		{
   116 		font_store = fbTop->FontStore();
   117 		font_store = fbTop->FontStore();
   117 		}
   118 		}
   118 	
   119 	
   119 	if (font_store)
   120 	if (font_store)
   120 		{
   121 	    {
   121 		font_store->DeleteSessionCache(iSessionHandle);
   122 		font_store->DeleteSessionCache(iSessionHandle);
   122 		font_store->CleanupCacheOnFbsSessionTermination(iSessionHandle);
   123 		font_store->CleanupCacheOnFbsSessionTermination(iSessionHandle);
   123 		
   124 		
   124 		// If the font store doesn't exist, neither will the shared heap owned by FBSERV.
   125 		// If the font store doesn't exist, neither will the shared heap owned by FBSERV.
   125 		iHeap->Free(iOpenFontGlyphData);
   126 		iHeap->Free(iOpenFontGlyphData);
   126 		}
   127 	    }
   127 	
   128 
   128 	// delete fonts held by the client
   129     // output each bitmap that is about to be destroyed...
       
   130 	FBS_OST
       
   131         ({
       
   132         for (TInt ii = iIx->Count() - 1; ii >= 0; --ii)
       
   133             {
       
   134             CObject* object = (*iIx)[ii];
       
   135             TInt localHandle = iIx->At(object);
       
   136             if ((localHandle != KErrNotFound) && (iIx->At(localHandle, fbTop->BitmapConUniqueID()) != NULL))
       
   137                 {
       
   138                 OstTraceExt3( GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, CFBCLIENT_DESTRUCTOR_INFO2, "# Server resource destroyed; iSSH=0x%08x; rc=%d; iH=0x%08x;", iSessionHandle, iResourceCount, localHandle);
       
   139                 }
       
   140             }
       
   141 	    })
       
   142 	// delete fonts and bitmaps held by the client
   129 	delete iIx;
   143 	delete iIx;
   130 	
   144 	
   131 	// delete font files held by the client
   145 	// delete font files held by the client
   132 	if (iFontFileIndex)
   146 	if (iFontFileIndex)
   133 		{
   147 		{