A unsure question about getting data

in Help Center
Hi;
when I got data from the ICE server all the while and the ICE server did not be started, the memory has leaked.
Thanks
when I got data from the ICE server all the while and the ICE server did not be started, the memory has leaked.
public void ProcessStart() { string [] args= new string [1]; args[0]=""; Ice.Communicator o_icecomm=Ice.Util.initialize(ref args); testIPrx p1=null; string sConnectstr = "172.16.166.166" + "PCManager:default -h " + "172.16.166.166" + " -p " + "10007"; while(true) { try { Ice.ObjectPrx obj = o_icecomm.stringToProxy(sConnectstr); p1= testIPrxHelper.uncheckedCast(obj.ice_twoway().ice_timeout(1000).ice_secure(false)); System.Threading.Thread.Sleep(1000); //obj.ice_timeout(200); p1.GetAgentData();// try to connect } catch(Ice.ConnectFailedException) { System.Threading.Thread.Sleep(1000); } catch(Ice.TimeoutException) { System.Threading.Thread.Sleep(1000); } finally { } System.GC.Collect(); } }Here,I do't destroy communicator in order that the Ice Server send data to the Ice clinet by callback function. I think I only create one communicator ,the memory should not be increased all the while .So I don't destroy it. That code don't include callback part,that is only my test.
Thanks
0
Comments
I destroy the communicator ,the memory has leaked all the same.
There is a demo.
I only observe the task manage . So I am unsure .But the memory of process do be increased certainly. That is a windows service process.
Thanks.
- The physical memory heavily depends on the paging strategy of the operating system. See also this thread for more information.
- The memory consumption of the JVM is not the same as the memory consumption of the Java application running in the JVM. The JVM might decide not to give back memory to the operating system, or it might give it back later. That is, from the size of the JVM you cannot deduce the memory consumption of your Ice application.
(Whatever has been said above for the JVM is also correct for .NET, in case your example above is C# and not Java.)I has read that thread. And I understand you said.But at the beginning of the memory of the process is about 13M , after many hours the memory of the process is about 50 M. The total memory increased a bout 50-13M. I doubt some don't be collect in windows service mode.
Thanks.
So, I'm afraid that I cannot reproduce this. Do you have any more info for how to provoke the problem?
Thanks,
Michi.
It is my mistake.
Thank you .
because other handles don't be closed in my process,not in this demo. Sorry.
Thanks a lot.