There is a memory consumption/leak using the TThread.Synchronize function. A callback function is called out of another ("external") thread (from an loaded DLL). Inside the callback function a synchronized call to a procedure has to be done. Every thing works without error, but there is a memory use increasement during the TThread.Synchronize call.
procedure OnExternalThreadCallback(...); cdecl; begin ... TThread.Synchronize(nil, @MyMainClass.CallbachSyncedWithMainThread); ... end; The external thread are created/used/freed like discussed in the Lazarus mailing list: Mutlithreaded Dll Callback crashes my Application <http://lists.lazarus.freepascal.org/pipermail/lazarus/2010-August/054728.html> The memory leak problem arises with Lazarus 1.6.0 and FPC 3.0.0. Under the hood the processing of the TThread.Synchronize changed. Lazarus 1.4.4 with FPC 2.6.4 didn't have this problem. I don't have the versions between 1.4.4 and 1.6.0, therefore I cannot say something about them (if there are any).
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus