AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein TThread gibt beim Beenden Speicherleck
Thema durchsuchen
Ansicht
Themen-Optionen

TThread gibt beim Beenden Speicherleck

Ein Thema von DieDolly · begonnen am 2. Mär 2019 · letzter Beitrag vom 3. Mär 2019
 
mjustin

Registriert seit: 14. Apr 2008
3.011 Beiträge
 
Delphi 2009 Professional
 
#9

AW: TThread gibt beim Beenden Speicherleck

  Alt 2. Mär 2019, 19:03
Dafür gibt es schon eine extra Methode
nämlich
Thread.Free; - ja, so einfach

Seit ich diesen Hinweis gelesen habe bin ich kein Freund von TThread.Free mehr:

Zitat:
NEVER call Free() on a thread that has not been signaled to terminate yet. DO NOT rely on the thread destructor calling Terminate() and WaitFor() for you. ALWAYS call them explicitally in your own code instead. Plenty of people have run into problems over the years by freeing a running thread and letting the destructor do the termination. It just does not work correctly, and is not the right place to handle this anyway. – Remy Lebeau
Michael Justin
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:41 Uhr.
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