Вниз
Скачать: CL | DM;

PThread leak   Найти похожие ветки 

 
SuphEr   (2005-05-06 22:59) [0]

Здрасте!
Моя проблема такова...
Допустим процедура на кнопке:
procedure TForm1.Button1Click(Sender: PObj);
var thMethod: PThread;
begin
  thMethod:=NewThread;
  thMethod.Free;
end;

Если нажимать на кнопку быстро много раз, то появляются лики в памяти... Как от этого избавиться?


 
Thaddy   (2005-05-07 00:13) [1]

This code is not good:
You should either terminate the thread before calling free, or use          NewthreadAutofree createion function.
What happens here is you create a thread (suspended!) and do not even start it. You need to start it at least once for proper release with free.


 
SuphEr   (2005-05-09 01:27) [2]

Very big thanks! All work! =)



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.023 c
2-1134302428
skysat
2005-12-11 15:00
2005.12.25
Ковертация Dos-формата


14-1133692451
shamanTa
2005-12-04 13:34
2005.12.25
Так просто...


2-1134291470
vasek
2005-12-11 11:57
2005.12.25
как в DBGrid в ходе работы программы поменять DataSourse?


2-1134225787
De1uxe
2005-12-10 17:43
2005.12.25
String


14-1133364781
Piter
2005-11-30 18:33
2005.12.25
Плагин к Miranda




   Наверх