genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
392 stars 155 forks source link

TcpClientHelper memory management problem #188

Closed Kejszijo closed 8 years ago

Kejszijo commented 9 years ago

I did a test with this code. This is a simple connection to a TCP server with status feedback. Nothing else. Still, steadily increasing memory usage when running the program.

Homegenie use of memory: 2015.07.17 12:46 56 MB 2015.07.17 20:40 225 MB

If the program not running, the memory usage 41-43 MB continuously.

Code: var remoteServer = "10.1.1.131"; var remotePort = 6000; var NetworkRelaysModules = Modules.InDomain("HomeAutomation.NetworkRelays");

Action HandleStatusChanged = (bool connected) => { Program.Notify("TCP Client", "Connected = " + connected); };

Program.Notify("TCP Client", "Starting");

TcpClient .OnStatusChanged( HandleStatusChanged ) .Service( remoteServer ) .Connect( remotePort );

Program.Notify("TCP Client", "Started"); Program.Parameter("Status.Level").Value = "1";

Program.GoBackground();

genemars commented 8 years ago

please try r499 and let me know if the problem is solved. https://sourceforge.net/projects/homegenie/files

Kejszijo commented 8 years ago

Hi Gene!

I install version 499 HG. Now I can't start my program. "Object reference not set to an instance of an object"

genemars commented 8 years ago

please try again with the new r499 package, also if possible give further details (O.S., mono version, etc..)

Kejszijo commented 8 years ago

Hi Gene!

I try with new r499. It's works fine for me. The memory usage has not changed four days ago.

Many thanks for it!