<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Andrew Brunner escribió:
<blockquote
cite="mid:a2922880903200806u1674c091wb568ee042b74a47f@mail.gmail.com"
type="cite">
<pre wrap="">2009/3/20 Liyuán García Caballero <a class="moz-txt-link-rfc2396E" href="mailto:liyuan@cav.desoft.cu"><liyuan@cav.desoft.cu></a>:
</pre>
<blockquote type="cite">
<pre wrap="">Check my Thread code:
procedure Tcheckonline.Execute;
begin
sock.HTTPTunnelTimeout := 10000;
query.FileName:=vpathdb;
query.SQL:='SELECT * FROM computer WHERE name='''+vhost+''';';
query.Open;
if query.FieldByName('proxy').Value then
begin
if query.FieldByName('proxy_type').AsString = 'HTTP' then
begin
sock.HTTPTunnelIP := query.FieldByName('proxy_host').AsString;
sock.HTTPTunnelPort := query.FieldByName('proxy_port').AsString;
sock.HTTPTunnelUser := query.FieldByName('proxy_user').AsString;
sock.HTTPTunnelPass := query.FieldByName('proxy_pass').AsString;
sock.Connect(query.FieldByName('ip').AsString+
':'+query.FieldByName('port').AsString,'0');
end;
end else
</pre>
</blockquote>
<pre wrap=""><!----> sock.Connect(query.FieldByName('ip').AsString,query.FieldByName('port').AsString);
</pre>
<blockquote type="cite">
<pre wrap=""> sock.SendString('noop;' + #10);
if parse_proto('noop',sock.RecvPacket(500)) = 'ok' then
begin
vimg:=1;
Synchronize(@putstatus);
end else
begin
vimg:=0;
Synchronize(@putstatus);
end;
</pre>
</blockquote>
<pre wrap=""><!---->
// Comments... You shouldn't terminate and free items here. Let
execute run its course... // The on destruction, the resources should
be reclaimed there.
// See Destructor below.
</pre>
<blockquote type="cite">
<pre wrap="">end;
procedure Tcheckonline.putstatus;
begin
fprincipal.tvnode.Items[fprincipal.tvnode.Items.FindNodeWithText(vhost).Index].SelectedIndex:=vimg;
fprincipal.tvnode.Items[fprincipal.tvnode.Items.FindNodeWithText(vhost).Index].ImageIndex:=vimg;
end;
function Tcheckonline.parse_proto(command, data: String): String;
var
str : String;
ini, fin : Integer;
begin
ini := Pos(command,data);
fin := Pos('=',data);
str := copy(data,ini,fin-ini);
if str = command then
Begin
ini := Pos('=',data)+1;
fin := Pos(';',data);
str := copy(data,ini,fin-ini);
Result := str;
end
end;
constructor Tcheckonline.create(CreateSuspended: Boolean; ahost, apathdb:
String);
begin
sock:= TTCPBlockSocket.Create;
query := TSqlite3Dataset.Create(nil);
vpathdb:=apathdb;
vhost := ahost;
FreeOnTerminate:=True;
inherited Create(CreateSuspended);
end;
</pre>
</blockquote>
<pre wrap=""><!---->
destructor TCheckOnline.Destroy;
begin
sock.Free;
query.Free;
inherited Destroy;
end;
</pre>
</blockquote>
<br>
The same behavior, memory continues to grow <span class="moz-smiley-s2"><span>
:-( </span></span><br>
<br>
<br>
<div class="moz-signature">-- <br>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Firma</title>
<p class="MsoNormal" style=""><b><span
style="font-size: 14pt; font-family: "Verdana","sans-serif"; color: rgb(30, 52, 146);"
lang="ES-TRAD">Lic. Liyuán García Caballero</span></b><b><span
style="font-family: "Verdana","sans-serif"; color: navy;"
lang="ES-TRAD"><br>
</span></b><span
style="font-size: 10pt; font-family: "Verdana","sans-serif"; color: rgb(0, 51, 102);"
lang="ES-TRAD"> </span><b><span
style="font-size: 9pt; font-family: "Verdana","sans-serif"; color: rgb(153, 153, 153);">Especialista
B en Ciencias Informáticas</span></b><o:p></o:p></p>
<b><span
style="font-family: "Verdana","sans-serif"; color: rgb(30, 52, 146);"
lang="ES-TRAD">Excelencia en Software<br>
</span></b><span
style="font-size: 8pt; font-family: "Verdana","sans-serif"; color: rgb(30, 52, 146);"
lang="ES-TRAD">Desoft Ciego de Ávila. <br>
Calle 2 y Joaquín de
Agüero. Ciego de Ávila. Cuba.<br>
<img style="width: 22px; height: 22px; float: left;" alt="e-mail:"
src="cid:part1.04080906.05050207@cav.desoft.cu"> <b><a class="moz-txt-link-abbreviated" href="mailto:liyuan@cav.desoft.cu">liyuan@cav.desoft.cu</a><br>
</b><img style="width: 22px; height: 22px; float: left;" alt="jabber:"
src="cid:part2.04060407.07070603@cav.desoft.cu"><b>
<a class="moz-txt-link-abbreviated" href="mailto:liyuan@jabber.cav.desoft.cu">liyuan@jabber.cav.desoft.cu</a><br>
<img style="width: 22px; height: 22px; float: left;" title="Ubuntu"
alt="SO:" src="cid:part3.06030107.09060205@cav.desoft.cu"></b><b>Ubuntu
Linux</b></span></div>
</body>
</html>