Deleting A View
| Thu, 2005-03-31 08:15 | |
|
Hi,
I am having a problem getting rid of a view in my application. Basically, I have 3 views, the first two are created and added to my AppUI in the AppUI ConstructL. My third view is temporary and is only added and switched to when a particular menu item is selected. That works, the problem I have is that when I switch back to the original view, I no longer need the temporary view, so I want to delete it. The actual deletion works fine, but my program then crashes within the symbian libraries. I get a Unhandled exception at 0x057d9dac in epoc.exe: 0xC0000005: Access violation reading location 0xdededf52. and the call stack shows that I am in eikcoctl.dll!057d9dac(). The temporary view is created as a member variable of my AppUI class, so that I have a pointer to it that I can use at a later stage to delete the view. I am really confused. If I don't delete the view, it all works ok, but to me that is a waste of memory, because the view will never be used again during the lifespan of the application. I would appreciate any help or advise that could be given. Thanks in advance |
|






Forum posts: 8
calling CAknViewAppUi::RemoveView() will destroy the view. But don't call it for the currenty active view, it will crash.