Главная страница
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.036 c
8-1121326436
lord Zeratul
2005-07-14 11:33
2005.12.25
Двойная буфферизация


1-1133421860
Zhekson
2005-12-01 10:24
2005.12.25
CheckBox в MessageDlg


14-1133427002
WondeRu
2005-12-01 11:50
2005.12.25
Какое приложение написать на J2ME?


6-1126365368
Express
2005-09-10 19:16
2005.12.25
Socket


3-1131295247
Michael5
2005-11-06 19:40
2005.12.25
Подскажите, незаполненные поля БД увеличивают размер файла или не