[Lazarus] Reading and writing TMemoryStream in events?

Michael Schnell mschnell at lumino.de
Mon Nov 8 10:16:46 CET 2010


If the "Event" is just a normal (main-thread) event, there should be no 
problem using whatever data structure in the normal way.

f the "Event" is fired in a thread context, you need to use critical 
sections top manage the mutual accesses. TThreadList does this for  you, 
so you might want to allocate a new chunk of the data when the thread 
read it and add the pointer to the chunk in a TThreadList.

-Michael




More information about the Lazarus mailing list