How can I remove the current view ? Application works fine with this code when removing any other view than current but with current it crashes. Even if current view is first switched to another and in next line deleted it crashes.

This is code used to remove view:

TUid uid = TUid::Uid(iTabGroup->ActiveTabId());
iTabGroup->DeleteTabL(uid.iUid);

this->RemoveView(uid);

It works fine if just remove the view from tabgroup (but it persists in memory).

- Mikko Hurskainen