Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Aug : More thread problems

www.cryer.info
Managed Newsgroup Archive

More thread problems

Subject:More thread problems
Posted by:"Gerhard Venter" (gerhard.vent..@comtronic.com)
Date:Thu, 25 Aug 2005 14:33:03

Threads are like children, just as you think you understand them they
surprise you with something else. All of a sudden I get an AV when I want to
terminate a thread.

This code is still in the same context as those from my other posts.

    if Assigned(FListenerThread) then
    begin
      FListenerThread.Terminate;
      //FListenerThread.Free;  <== FreeOnTermiate = True
      FListenerThread := nil;
    end;

Funny thing is the Assigned part is true as it goes into the begin end block
but then I can't even step into the terminate during debugging. I know it is
probably difficult to tell what is wrong with the amount of information
given here but any thing comes to mind form anybody's experiences?

Gerhard

Replies:

www.cryer.info
Managed Newsgroup Archive