Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory Leak in NIDAQmx

Hi, I'm using PXI-6514 DIO card with NIDAQmx v8.5.0f3. When I run the code below continuously to read a digital input, the memory usage was increasing. Is there any memory leak issue in NIDAQmx library?
 
int status
TaskHandle task;
long nRead, nByte; 
unsigned char chState;

status = DAQmxCreateTask("", &task);
if ( !status ) status = DAQmxCreateDIChan(task, "DIO2/port0/line0", "", DAQmx_Val_ChanPerLine);
if ( !status ) status = DAQmxStartTask(task);
if ( !status ) status = DAQmxReadDigitalLines(task, 1, 1.0, DAQmx_Val_GroupByChannel, &chState, 1, &nRead, &nByte, NULL);
DAQmxStopTask(task); 
DAQmxClearTask(task); 
if ( status )
      return status;
Thanks
Eric
0 Kudos
Message 1 of 2
(2,778 Views)
Hello eric,

I see that you are using the PXI-6514 with the DAQmx 8.5 driver to program a countinuous digital read.

What environment are you programming in?
How are you monitor the memory usage?
At what rate is the increase of the memory?

Take a look at the shipping examples for Continuous Digital Read. Run those examples and see if you also see an increase in memory usage.

Regards,
  Sandra T.

Applications Engineer | National Instruments
0 Kudos
Message 2 of 2
(2,747 Views)