PDA

View Full Version : How to destroy a thread ?



probine
9th December 2006, 18:26
I have a thread, which is created of course in another class.

This thread creates a window and has a text browser. I have also added a destructor to this class.

The destructor should destroy all the pointers I am using in the thread, but invoking "exit()" or "quit()" or "terminate()" is not taking me to the destructor.

How do I invoke a destructor then, so the object(s) is destroyed ?

wysota
9th December 2006, 19:04
Delete the object. The methods you mentioned just stop execution of the thread, they don't destroy the thread object.