Главная страница
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.071 c
14-1133664717
Копир
2005-12-04 05:51
2005.12.25
Enter pool. Дорогие мои москвичи!


14-1133285303
Andy BitOff
2005-11-29 20:28
2005.12.25
Столкнулся с новой для себя проблемой...


14-1133366744
Fl@sh
2005-11-30 19:05
2005.12.25
Посоветуйте книгу, где хорошо расписаны Rave Reports


2-1133990739
JazY
2005-12-08 00:25
2005.12.25
Создание отчетов.


14-1132177508
Prohodil Mimo
2005-11-17 00:45
2005.12.25
Какая из цифр означает номер лицензии delphi 2005?