LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

WMI implementation, with big memory leakage. Help?!

Hello everyone,

I am trying to detect all the COMmunication ports (COM1,2,3...) by using WMI Classes directly from labview.

This VI is called repeadly from the main application, and checking task manager I detected a big memory leakage, let's say about 1Mb as avarage at every call.

The memory is freed when I close the application, but this is a problem, because the subvi have to be called frequently (let's say 2 times at second) to detect new USB/RS232 interface attached on the fly.

I'm not expert in .NET, and I used an idea of Lycangeek 

http://forums.ni.com/t5/LabVIEW/How-to-access-WMI-Classes-via-NET-in-LabVIEW/td-p/253845?lang=en

but even tying to close references and dispose object, there is still an error.

Does someone can help me, please?

Marco.

0 Kudos
Message 1 of 2
(2,657 Views)

A quick test on the final post VI in the other thread shows that the Constructor node allocates a lot of memory, move it outside any loop and thing will calm down significantly.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 2
(2,599 Views)