Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi TThread und TTimer - Free führt zu Exceptions (https://www.delphipraxis.net/74919-tthread-und-ttimer-free-fuehrt-zu-exceptions.html)

xaromz 11. Aug 2006 11:45

Re: TThread und TTimer - Free führt zu Exceptions
 
Hallo,
Zitat:

Zitat von DocE
Jetzt ist nur noch die Frage, was besser ist. Erzeugen und Freigeben der Objekte im Hauptthread (also im TThread.Create bzw. mit Synchronize) oder besser beides im Thread selbst (also im Execute).

Das ist Geschmackssache. Wenn Du aber einen Thread erstellst und diesen wiederverwendest, dann ist das Erstellen und Zerstören im Hauptthread möglicherweise performanter als immer wieder neue Objekte im Thread zu erzeugen.
Zitat:

Zitat von DocE
Ich sehe da evtl. noch die Gefahr, dass es zu Problemen kommt, wenn der Thread "abstürzt". Oder ist das unbegründet?

Wenn Du mit try...finally arbeitest hast Du keine Probleme.

Gruß
xaromz


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:25 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz