Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.12.25;
Скачать: 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 вся ветка

Текущий архив: 2005.12.25;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.044 c
2-1134121057
De
2005-12-09 12:37
2005.12.25
Почему Incompatible types: Integer and Pointer ?


14-1133771685
Anton__
2005-12-05 11:34
2005.12.25
Программа, выполняющаяся на сервере


2-1134132952
sanich
2005-12-09 15:55
2005.12.25
Имборт из FoxPro в Firebird


2-1133961253
MakNik
2005-12-07 16:14
2005.12.25
организация доступа к приложению


2-1134384927
De1uxe
2005-12-12 13:55
2005.12.25
Работа с битовыми образами