Is your program single-threaded or multi-threaded? I call it from multiple threads. Is it related to multi-thread calls?
client.Dispose();
System.GC.Collect(); I have added it in the program and it is useless
I am a client, no multithreading
But you say "a single thread will also cause the handle to grow, and there is no file stream access", so you have this question
I wrote a single-threaded test and found that it really dropped after 300 or so. It may still be related to multi-threading. I don't know why this phenomenon occurs when calling in multi-threading?
while (i<1000)
{
Service1 client=new Service1();
client.HelloWorld();
client.Dispose();
Thread.Sleep(1000);
Console.WriteLine("Execute {0} times", i.ToString());
i++;
To
}