Thanks for the tip Arno.
I was calling abort, but then going on to free the components after the Abort.
I'll add a delay, and a custom message as you advise.
> From: arno.garr...@gmx.de
> To: firstname.lastname@example.org
> Date: Thu, 13 May 2010 15:12:20 +0200
> Subject: Re: [twsocket] Correct shutdown/abort procedure
> 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
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
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