Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Problem with navigation pane

0 replies · 1,412 views · Started 20 June 2004

Hi,all
I just want to display a text in my Navigation Pane.
I try this:

void CMyContainer::ConstructL(const TRect& aRect)
{
CreateWindowL();

CEikStatusPane *sp = ((CAknAppUi*)iEikonEnv->EikAppUi())->StatusPane();
iNaviPane = (CAknNavigationControlContainer
*)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
TBuf< 40 > tempLabel;
iCoeEnv->ReadResource(tempLabel, R_MYSPANE_NAVI_MANAGE);
iNaviDecorator = iNaviPane->CreateNavigationLabelL(tempLabel);
iNaviPane->PushL(*iNaviDecorator);

....
}

CMyContainer::~CMyContainer()
{
iNaviPane->Pop(iNaviDecorator);
if (NULL != iNaviDecorator)
{
delete iNaviDecorator;
iNaviDecorator = NULL;
}
...
}

I have deleted iNaviDecorator object , but my application always cause memory leak.
It reported the error:
Program closed:
myapp
ALLOC: 10059d38
0

What's wrong with it? Please help me, thx ^_^