--- a/idlehomescreen/hscontentcontrol/src/hscontentcontrolfactory.cpp Fri Feb 19 22:42:37 2010 +0200
+++ b/idlehomescreen/hscontentcontrol/src/hscontentcontrolfactory.cpp Fri Mar 12 15:41:49 2010 +0200
@@ -103,22 +103,13 @@
//
EXPORT_C CHsContentControlFactory::~CHsContentControlFactory()
{
+ delete iHsContentControlEComListener;
+ delete iHsContentControlUninstallMonitor;
+
iImplArray.ResetAndDestroy();
iImplArray.Close();
- if ( iHsContentControlUis.Count() > 0 )
- {
- for( TInt index( iHsContentControlUis.Count() - 1 ); index >= 0; --index )
- {
- CHsContentControlUi* cc( iHsContentControlUis[ index ] );
- ReleaseHsCcUi( cc );
- }
- }
-
iHsContentControlUis.ResetAndDestroy();
-
- delete iHsContentControlEComListener;
- delete iHsContentControlUninstallMonitor;
}
// ---------------------------------------------------------------------------------
@@ -126,7 +117,7 @@
// ---------------------------------------------------------------------------------
//
EXPORT_C MHsContentControlUi* CHsContentControlFactory::GetHsContentController(
- const TDesC8& aControlType )
+ const TDesC8& aControlType )
{
MHsContentControlUi* retval( FindHsContentController( aControlType ) );
@@ -167,6 +158,22 @@
return retval;
}
+// ---------------------------------------------------------------------------------
+// CHsContentControlFactory::PrepareToExit()
+// ---------------------------------------------------------------------------------
+//
+EXPORT_C void CHsContentControlFactory::PrepareToExit()
+ {
+ if ( iHsContentControlUis.Count() > 0 )
+ {
+ for( TInt index( iHsContentControlUis.Count() - 1 ); index >= 0; --index )
+ {
+ CHsContentControlUi* cc( iHsContentControlUis[ index ] );
+ ReleaseHsCcUi( cc );
+ }
+ }
+ }
+
// ----------------------------------------------------------------------------
// CHsContentControlFactory::FindHsContentController()
// ----------------------------------------------------------------------------
@@ -245,7 +252,7 @@
// If an implementation is not present in present in the plugInArray then its removed.
for( TInt index( iImplArray.Count() - 1 ); index >= 0 && !done; --index )
{
- uid = plugInArray[ index ]->ImplementationUid();
+ uid = iImplArray[ index ]->ImplementationUid();
CImplementationInformation* implInfo =
FindPluginImplInfo( uid, plugInArray );
if ( implInfo && PluginUpgradeDowngrade( *implInfo ) )