NI LabVIEW,CVI,数据采集等产品讨论区

取消
显示结果 
搜索替代 
您的意思是: 

内存不释放

我在使用vb6.0对采集卡进行数据读取的过程中,发觉每次采集到的数据都会滞留在内存中,不会十分哪个,b不会被释放.
On Error GoTo ErrorHandler
'    startCommandButton.Enabled = False
   
    If ValidateControlValues Then
'        startCommandButton.Enabled = True
        Exit Sub
    End If
    '  Create the DAQmx task.
    DAQmxErrChk DAQmxCreateTask("", taskHandle)
    taskIsRunning = True
   
    '  Add an analog input channel to the task.
    DAQmxErrChk DAQmxCreateAIVoltageChan(taskHandle, "Dev1/ai0", "", _
                    DAQmx_Val_InputTermCfg_RSE, "-10", "10", _
                    DAQmx_Val_VoltageUnits1_Volts, "")
   
    '  Read in one sample from the analog input channel.
    DAQmxErrChk DAQmxReadAnalogScalarF64(taskHandle, 10#, Data, ByVal 0&)
                    
    '  Display the acquired sample on the user interface
   
    m_AI1(w) = CStr(Data)
    w = w + 1
'    Next i
    '  Call the StopTask module to stop the DAQmx task.
    If w > m_iMaxTorqueCount Then
    bSample_Finished = True
    StopTask
    Exit Sub
    End If
还请哪位有经验的帮我看一下
0 项奖励
1 条消息(共 1 条)
3,718 次查看