-
Memory leaks
Hi
I am working on series 80 platform, and currently finding memory leaks from my
application. For finding memory leaks , I am using following functions:
User::__DbgMarkStart(RHeap::EUser);
User::__DbgMarkEnd(RHeap::EUser,0);
This pairing works fine for some classes like CEikColumnListBox,
but for some classes like CCknSearchField ect, I am getting memory leaks
Here is my code:
User::__DbgMarkStart(RHeap::EUser);
MyListBox = new (ELeave) CEikColumnListBox();
delete MyListBox;
User::__DbgMarkEnd(RHeap::EUser,0);
This does not gives memory leak.
But If I tries same technique on CCknSearchField like this
User::__DbgMarkStart(RHeap::EUser);
CCknSearchField* SearchField =
CCknSearchField::NewL(*this,CCknSearchField::ESearch,NULL,20);
delete SearchField;
User::__DbgMarkEnd(RHeap::EUser,0);
It shows me memory leak.
I did another test , I created simple application, in that I creates
CCknSearchField class control in constructL , I deletes CCknSearchField object in
destructor.Now application exits without allocation panic.
If some memory leaks happens in CCknSearchField , it should happen in above case also.
Whats difference between these two scenerio?
I am not getting Whats going wrong.
I am using CEikAppUi::Exit() in both cases for exting from application.
Thanks in advance.
Manish