> Any ideas how to make it on TObjectList so it wouldnt crash?

What about OwnObject property ?
--
[EMAIL PROTECTED]
http://www.overbyte.be


----- Original Message ----- 
From: "Ann" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Sunday, December 18, 2005 12:59 PM
Subject: Re: [twsocket][THTTPCLI] What am i doing wrong? ;-(


>
> ---- Wiadomość Oryginalna ----
> Od: Francois PIETTE <[EMAIL PROTECTED]>
> Do: ICS support mailing <twsocket@elists.org>
> Data: Sun, 18 Dec 2005 12:22:54 +0100
> Temat: Re: [twsocket] [THTTPCLI] What am i doing wrong? ;-(
>
>> > I've changed .CloseAsync to .Abort and nothing changed :-( Still
> got
>> > access violation. Access violation only occures if Timer2 is
>> > Enabled. Somewhere in this code (Even without calling abort):
>> >
>> >> > for i:=HTTPCliList.Count - 1 downto 0 do
>> >> > begin
>> >> >  todestroy:=THTTPCLI(HTTPCLILIST[i]);
>> >> >  if todestroy.Tag = -1 then
>> >> >   begin
>> >> >    HTTPCliList.Delete(i);
>> >> >    todestroy.Destroy;
>> >> >    httpcli_count:=httpcli_count-1;
>> >> >   end;
>> >> > end;
>> >> > end;
>>
>> With the debugger, you'll be able to pin-point exactly where the
> AV occur.
>> Try changing the logic as I said:
>>
>> for i:=HTTPCliList.Count - 1 downto 0 do begin
>>   todestroy:= HTTPCLILIST[i] as THTTPCLI;
>>   if todestroy.Tag = -1 then
>>     todestroy.Abort;
>> end;
>>
>> Then in OnRequestDone event, handle as if it where success but of
> course
>> don't process data.
>
> There is something wrong with HTTPList... ;-( Maybe TObjectList cant
> handle so many async requests? I changed the code to something like
> this:
>
> for i:=Form1.ComponentCount -1 downto 0 do
> begin
>  If form1.Components[i] is THttpCli then
>   begin
>    if (abs((noww-THTTPCLI(form1.Components[i]).Tag)) > 60)
>     and (THTTPCLI(form1.Components[i]).Tag <> -2)and
> (THTTPCLI(form1.Components[i]).Tag <> -1) then
>    begin
>     THTTPCLI(form1.Components[i]).Abort;
>    end;
>
>    if THTTPCLI(form1.Components[i]).Tag = -1 then
>     begin
>      utworzono:=utworzono-1;
>      THTTPCLI(form1.Components[i]).Destroy;
>     end;
>
>   end;
> end;
>
> ... but its not a good code. Works fine but it shouldnt be done like
> that... :/ Any ideas how to make it on TObjectList so it wouldnt
> crash?
>
>
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to