Вниз
Скачать: 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.024 c
4-1129213569
IceBeerg
2005-10-13 18:26
2005.12.25
"Перезапуск" иконок в трее


14-1133783193
Bogdan1024
2005-12-05 14:46
2005.12.25
помогите пожалуйста придумать задачу


14-1133453386
Gydvin
2005-12-01 19:09
2005.12.25
Помогите выбрать сотку


2-1133836471
Фокус
2005-12-06 05:34
2005.12.25
Допустим ли символ #152 в имени файла?


4-1130328960
Mpokemonov
2005-10-26 16:16
2005.12.25
открыть DLL




   Наверх