Pete Williams wrote: > At any point, an account may be requested to stop. > > What is the correct way to say to these 2 components 'stop whatever > you are doing, clean up and quit'? > > The thread that the components exist in continues to run. > > The problem I have is that sometimes after they've stopped, I get > GPFs in the message pump that these used to exist in - sometimes > immediately, sometimes after a delay of several minutes.
In order to abort and stop them as fast as possible call Abort. Abort most likely will trigger other events, setting all event handlers to nil prevents this. Since an instance may not be freed from its own event handlers one has to PostThreadMessage() a custom message, and free the object when this message is handled. The thread requires a custom message pump. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
