LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with TCP/IP memory leak

There is a memory leak in the attached vi that I am unable to find. The purpose of this VI is to read incoming strings from a custom instrument via TCP/IP port 23 (telnet).

 

The main VI that runs in the attached folder is "CI Instrument Communications.vi". The vi will leak approximatley 2GB of memory over an 8 hour period. Please let me know what you guys can find.

0 Kudos
Message 1 of 3
(2,881 Views)

Why do you keep opening and closing your ethernet port?  You only need to open it up once.  You are just adding a bunch of overhead to the TCP layer.

 

Also the constant building of the string could lead to issues.  I don't think that is your issue, but it is something to look into.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,825 Views)

Thanks for the reply. I originally wasn't closing the connection after each call, but I decided to try it to see if not closing it was the cause of the leak. In an example I found the connection was being closed and re-opened each loop iteration. This didnt fix the issue, so i'm still searching. 

 

I'll look into the string.

0 Kudos
Message 3 of 3
(2,816 Views)