uiacceltk/hitchcock/ServerCore/Src/alfstreamerserver.cpp
branchRCL_3
changeset 52 31fccae4f8a7
parent 51 e5af45d51884
equal deleted inserted replaced
51:e5af45d51884 52:31fccae4f8a7
   225 // ---------------------------------------------------------------------------
   225 // ---------------------------------------------------------------------------
   226 //   
   226 //   
   227 CAlfStreamerServer::~CAlfStreamerServer()
   227 CAlfStreamerServer::~CAlfStreamerServer()
   228     {
   228     {
   229     delete iThemesListener;
   229     delete iThemesListener;
   230     delete iWindowMgr;
       
   231     delete iWindowHierarcy;
   230     delete iWindowHierarcy;
       
   231     iWindowHierarcy = NULL;
   232     iCompositionSessions.Close();
   232     iCompositionSessions.Close();
   233     iCompositionHostSessions.Close();
   233     iCompositionHostSessions.Close();
   234     iCompositionTokens.Close();
   234     iCompositionTokens.Close();
   235     iWindowServerSessions.Close();
   235     iWindowServerSessions.Close();
   236     iAlfTargets.Close();
   236     iAlfTargets.Close();
   237     iOptionalGRAM.Close();
   237     iOptionalGRAM.Close();
       
   238     iSignals.Close();
       
   239      // Remove "effectpluginnotunloaded" from 10282CAF.rss in order to really unload effect plugin
       
   240     // iWindowMgr->DestroyPlugin(TUid::Uid(0x2001e2cf)); // effects plugin. window manager needed for unloading.
       
   241     delete iWindowMgr;
       
   242     iWindowMgr = NULL;
   238     }
   243     }
   239 
   244 
   240 void CAlfStreamerServer::AppendCompositionSessionL(CAlfStreamerServerSession* aSession, TBool aHost)
   245 void CAlfStreamerServer::AppendCompositionSessionL(CAlfStreamerServerSession* aSession, TBool aHost)
   241     {
   246     {
   242     if(!aHost)
   247     if(!aHost)
   795 CAlfStreamerServerSession::~CAlfStreamerServerSession()
   800 CAlfStreamerServerSession::~CAlfStreamerServerSession()
   796     {
   801     {
   797     TInt i = 0;
   802     TInt i = 0;
   798     RImplInfoPtrArray pluginArray;
   803     RImplInfoPtrArray pluginArray;
   799     REComSession::ListImplementationsL( KAlfGfxPluginInterfaceUId, pluginArray );    
   804     REComSession::ListImplementationsL( KAlfGfxPluginInterfaceUId, pluginArray );    
       
   805     CAlfWindowManager* windowMgr = NULL;
       
   806     if (Server())
       
   807         {
       
   808         windowMgr = ((CAlfStreamerServer*)(Server()))->WindowMgr();
       
   809         }
       
   810             
   800     for ( i = iLoadedPlugins.Count() - 1; i >= 0; i-- )
   811     for ( i = iLoadedPlugins.Count() - 1; i >= 0; i-- )
   801         {
   812         {
   802         TInt j = 0;    
   813         TInt j = 0;    
   803         for ( j= 0; j < pluginArray.Count(); j++ )
   814         for ( j= 0; j < pluginArray.Count(); j++ )
   804             {
   815             {
   805             TUid loaded = TUid::Uid(iLoadedPlugins[i]);
   816             TUid loaded = TUid::Uid(iLoadedPlugins[i]);
   806             TUid listed = pluginArray[j]->ImplementationUid();
   817             TUid listed = pluginArray[j]->ImplementationUid();
   807             TPtrC8 listedopaque = pluginArray[j]->OpaqueData();
   818             TPtrC8 listedopaque = pluginArray[j]->OpaqueData();
   808             if ( loaded == listed && ( (listedopaque.CompareF( KAlfDoNotUnloadPlugin )) != 0 ) )
   819             if ( loaded == listed && ( (listedopaque.CompareF( KAlfDoNotUnloadPlugin )) != 0 ) && windowMgr)
   809                 {
   820                 {
   810                 ((CAlfStreamerServer*)(Server()))->WindowMgr()->DestroyPlugin(TUid::Uid(iLoadedPlugins[i]));
   821                 windowMgr->DestroyPlugin(TUid::Uid(iLoadedPlugins[i]));
   811                 }
   822                 }
   812             }
   823             }
   813         }
   824         }
   814     // Clear the data in plugin array
   825     // Clear the data in plugin array
   815     for (TInt i = pluginArray.Count() - 1; i >= 0; i-- )
   826     for (TInt i = pluginArray.Count() - 1; i >= 0; i-- )