On 9/17/08, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > CheckSynchronize must be called by the main thread on a regular basis in > the event loop, so this is normal.
CheckSynchronize is called in the main eventloop. This happens on application termination. The gLog singleton is freed in the finalization section of a unit. So maybe it's a timing issue? The main eventloop has already stopped functioning, by the time the gLog singleton is being free'd.... [...quickly testing...] Umm, a quick test seems to reveal that might be the problem. As soon as the main form closes, the main eventloop stops as well - only then does the finalization section try to free the gLog singleton which contains the thread. Freeing the gLog singleton in the main form's OnClose event, seems to resolve the issue. How does this work in Lazarus? Do finalization code execute before the lazarus application's main eventloop terminates? Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal