diff -r 2e7bab7ab409 -r 9d6a662e71d9 extras/calcsoft/src/CalcView.cpp --- a/extras/calcsoft/src/CalcView.cpp Wed Sep 15 12:14:32 2010 +0300 +++ b/extras/calcsoft/src/CalcView.cpp Wed Oct 13 14:33:39 2010 +0300 @@ -75,7 +75,7 @@ iCalcDocument = STATIC_CAST(CCalcDocument*, AppUi()->Document()); iCalcDocument->SetCalcView( this ); - + CreateContainerL(); iCalcDocument->LoadStateL(); /******** Initialize the ServiceHandler in the ConstructL *****/ @@ -92,17 +92,12 @@ // Destructor CCalcView::~CCalcView() { - if ( iContainer ) - { - delete iContainer; - iContainer = NULL; - } - - if( iServiceHandler ) - { - delete iServiceHandler; - iServiceHandler = NULL; - } + delete iContainer; + if(iServiceHandler) + { + delete iServiceHandler; + iServiceHandler = NULL; + } } @@ -1044,13 +1039,8 @@ TUid /* aCustomMessageId */, const TDesC8& /* aCustomMessage */) { - if ( iContainer == NULL ) - { - CreateContainerL(); - AppUi()->AddToStackL( *this, iContainer ); - iContainer->ActivateL(); - } - + AppUi()->AddToStackL(*this, iContainer); + iContainer->ActivateL(); } // ---------------------------------------------------- @@ -1061,11 +1051,9 @@ // void CCalcView::DoDeactivate() { - if ( iContainer ) + if (iContainer) { - AppUi()->RemoveFromStack( iContainer ); - delete iContainer; - iContainer = NULL; + AppUi()->RemoveFromStack(iContainer); } }