Difference between AppUi:Exit() and User::Exit()
Login to reply to this topic.
Tue, 2006-05-16 11:55
Joined: 2005-02-12
Forum posts: 98
In My application ,i was calling CAknViewAppUi::Exit() when user clicks on Exit menu option or exit soft key.Then It was giving panic on Emulator but not on device.When i used User::Exit() then panic disappeared.
Can Anyone please explain Why it happened so.
thanks

Tue, 2006-05-16 12:26
Joined: 2004-05-26
Forum posts: 732
User::Exit()

Terminates the current thread, specifying a reason. All child threads are terminated and all resources are cleaned up.

If the current thread is the main thread in a process, the process is also terminated.

CEikAppUi::Exit()

Closes the app UI.

The above has been taken from the SDK help.

But you haven't mention what kind of an  error/panic you are getting! Without which how can one derive into a solution?

Tue, 2006-05-16 14:27
Joined: 2005-02-12
Forum posts: 98
I am getting System Exception...See attached screenshots.
AttachmentSize
myError1.jpg231.86 KB
Tue, 2006-05-16 14:29
Joined: 2005-02-12
Forum posts: 98
And when i debug I get this... (unable to understand)
AttachmentSize
debug1.jpg240.28 KB
Tue, 2006-05-16 14:50
Joined: 2004-05-26
Forum posts: 732
It seems that you have some memory leak in your application. Just debug your code.

You may also visit this url: Display the extended panic code in Emulator or Device.  Smiley

Wed, 2006-05-17 11:07
Joined: 2005-02-12
Forum posts: 98
Hi,
Yes You are absolutely right ..It is due to memory leak ..I cross checked it in HelloWorldPlus Example. I used APPui::Exit() ,put a memory leak and it panicked in debug build with orphaned cell no but when i used User::Exit(0) ,No panic appeared.

Perhaps User::Exit(0) does not call destructors (and therefore does not call framwoprk routines that causes panics).It forcefully cleans all resources...Am I right???
Wed, 2006-05-17 11:45
Joined: 2004-05-26
Forum posts: 732
Quote from: vikas_bansal
Perhaps User::Exit(0) does not call destructors (and therefore does not call framwoprk routines that causes panics).It forcefully cleans all resources...Am I right???

You are right.  Smiley


copyright 2003-2009 NewLC SARL