Hello all,
I am doing follow steps for hide/show navigation tabs.
.h
.cppCode:CAknNavigationControlContainer *iNaviContainer; CAknNavigationDecorator* iNaviLabelDecorator;
In ConstructL() to hide the tabs I am calling HideTabs(ETrue) and in destructor I am calling HideTabs(EFalse) and deleting the iNaviContainer and iNaviLabelDecorator.Code:void CImageViewer::HideTabs(TBool bFlag) { CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane(); iNaviContainer = (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi)); iNaviLabelDecorator = iNaviContainer->CreateNavigationLabelL(); static_cast<CAknNaviLabel*>(iNaviLabelDecorator->DecoratedControl())->MakeVisible(ETrue); if(bFlag) iNaviContainer->PushL(*iNaviLabelDecorator); //hides else iNaviContainer->Pop(iNaviLabelDecorator); //shows }
destuctor
But I am getting Alloc forCode:HideTabs(EFalse); if(iNaviContainer) delete iNaviContainer; if(iNaviLabelDecorator) delete iNaviLabelDecorator;
iNaviLabelDecorator = iNaviContainer->CreateNavigationLabelL();
Can any one tell me what can I do to remove the alloc panic for iNaviLabelDecorator in my case?
Regards,
Kavit.

Reply With Quote

