David HAROUCHE wrote:
> Better use a private TBitmap to the thread, and give public access to a > built-shadow TBitmap of it via a property of the Thread....
That is not correct. The really confusing part is that even local TBitmap are not thread safe unless you lock them.
This is because every TBitmap registers itself to the global BitmapCanvasList list in graphics.pas. And when the DC garbage collection FreeMemoryContexts() is called by the main thread the rug gets pulled from under you.
The Delphi VCL itself does not always lock TBitmaps in threads. Which is, for example, why TJPEGImage is not thread safe.
Jan Derk