Page 1 of 1

Problem with derived ~wxThread()

Posted: Wed Feb 17, 2016 2:42 pm
by Tapsa
I followed the wxThread example in here:
I made my own class that inherits wxThread, but its destructor is never executed.

Code: Select all


Code: Select all

    ... // Set the thread pointer of my frame to 0 so I can check if this thread is executing or not.
I can see the exit code appear in command prompt and my queued event ( = what to do after completion) executes as it should.
I'm worried that the wxThread objects pile up over time and never die.
My thread calls this in its constructor:

Code: Select all

What have I missed and how do I ensure that threads get destructed?

EDIT: Had to create the threads as detached.