Hello all,
I am doing follow steps for hide/show navigation tabs.

.h
Code:
CAknNavigationControlContainer *iNaviContainer;
CAknNavigationDecorator* iNaviLabelDecorator;
.cpp
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
}
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.
destuctor
Code:
  HideTabs(EFalse);
        if(iNaviContainer) 	delete iNaviContainer;
    	if(iNaviLabelDecorator)	delete iNaviLabelDecorator;
But I am getting Alloc for
iNaviLabelDecorator = iNaviContainer->CreateNavigationLabelL();

Can any one tell me what can I do to remove the alloc panic for iNaviLabelDecorator in my case?

Regards,
Kavit.