Ross Levis wrote:
Is it safe to Free a TThread object if it's still executing?
No.
I have a thread which uses Indy10 to upload a file to an FTP server.
Sometimes a connection and/or file transfer can take up to 30 seconds
or more on slow internet connections.
So in other words, it can take any amount of time at all.
This thread can be executing when the program is shut down. I run
the Terminate method and wait for 10 seconds for the thread to
finish, but if it doesn't, is it safe to Free it? Or is there a way
to force the termination of the thread before freeing it?
Have you tried calling the FTP component's Abort method? Or maybe Quit?
--
Rob
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi