vitalstates
Programmer
Can anyone suggest a way of setting freeonterminate when using the beginthread method in delphi. I launch a number of threads from my main form but have no way of knowing when they have finished so consequently cant free the handle that beginthread uses.
I have got around the above problem by using a standard TThread but when I create a canvas in the thread using the parent dc and then subsequently free it the GDI handle count(as shown in process explorer) still gets incremented. This means that if the program creates many threads over time then it will run out of GDI handles.
I have got around the above problem by using a standard TThread but when I create a canvas in the thread using the parent dc and then subsequently free it the GDI handle count(as shown in process explorer) still gets incremented. This means that if the program creates many threads over time then it will run out of GDI handles.