[fpc-pascal] Re: Is THostResolver creating a thread?

Zaher Dirkey parmaja at gmail.com
Wed May 8 18:31:47 CEST 2013


Maybe it use the thread again, try many requests if there is more threads?


On Wed, May 8, 2013 at 4:35 PM, silvioprog <silvioprog at gmail.com> wrote:

> 2013/5/8 Michael Van Canneyt <michael at freepascal.org>
>
>> On Wed, 8 May 2013, silvioprog wrote:
>>
>>> Oops,
>>>
>>> 2013/5/8 silvioprog <silvioprog at gmail.com>
>>>       [...]
>>> uses
>>>   resolve, winsock;
>>>
>>> procedure TForm1.Button1Click(Sender: TObject);
>>> var
>>>   FHostEntry: PHostEnt;
>>> begin
>>>   FHostEntry := gethostbyname('www.google.com.**br<http://www.google.com.br>
>>> ');
>>> end;
>>>
>>> ... gethostbyname('www.google.com'**) ...
>>>
>>
>> The resolver or netdb units do not create threads by themselves.
>>
>> But the windows Winsock routines may create threads (I would expect
>> this), and these may show up in your process manager.
>>
>> Michael.
>
>
> But my project will always have a thread that is never released? Even when
> I freed my objects, that thread is still there.
>
> Well, if this is done by the Windows API, I think we have nothing to do
> hehe...
>
> --
> Silvio Clécio
> My public projects - github.com/silvioprog
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>



-- 
I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3

Best Regards
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130508/9b8a6f81/attachment.html>


More information about the fpc-pascal mailing list