From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.



在使用NI-DAQmx时如何防止内存泄漏?



主要软件:
主要软件版本: 7.2
主要软件修正版本: 7.0
次要软件: LabVIEW Development Systems
硬件: Multifunction DAQ (MIO)

问题: 我该如何防止使用NI-DAQmx时的内存泄漏?

解答: 如果在一个循环中开始一个DAQmx的序列,但却没有使用DAQmx Clear Task VI,每一次调用都会在之前的内存基础上分配更多的内存,而不会释放之前的内存。使用DAQmx Clear Task VI能够释放内存,阻止内存泄漏。

注意:您可以通过查看任务管理器的内存来检查是否有内存泄漏。您也可能会收到关于内存不足的错误信息。

相关链接:
KnowledgeBase 2XDD7A7N: What is the Difference Between the DAQmx Stop Task.vi and DAQmx Clear Task.vi?
KnowledgeBase 2H2G13BS : Placing a Call By Reference Node in a Loop Creates a Memory Leak
KnowledgeBase 3FLFULK8 : Controls Property Node Leaks Memory
KnowledgeBase 31T899KD: How is the DAQmx Buffer Size Allocated for a Finite or Continuous Acquisition?

附件:





报告日期: 11/07/2006
最近更新: 11/08/2006
文档编号: 39G995DW