views:

45

answers:

2

I'm developing a program in wxwidgets that has one worker thread that does COM stuff. I just noticed that it has two entries in the task manager. Looks like

myapp.exe*32
myapp.exe*32

Is this duplicate entry normal? I noticed most other processes don't. Hmm. What could cause this?

I'm using Windows 7 Ultimate 64 bit.

+1  A: 

This is not supposed to happen. Try terminating both processes and starting your application again. wxWidgets applications sometimes have the tendency to continue running after the last window is closed if things aren't set up right. I'm guessing your application got started twice somehow.

George Edison
A: 

If your main window is a wxDialog you need to handle the EVT_CLOSE event and call Destroy(). If you don't the window is simply hidden and the process is still running in the background.

You should also use it to destroy your worker thread before closing properly the application.

edit: Btw here is a link with an explanation, you can jump directly to the chapter Closing the application

f4