Solution
In LabVIEW 2017, the memory manager was updated to hold more memory rather than returning it to the operating system. This changed was implemented to improve future allocation speed.
To use the
Request Deallocation function, the following considerations must be made:
- Request Deallocation only works for subVIs that complete a call but remain reserved.
- A caller VI that runs once and completes will not indicate any memory deallocation.
- Request Deallocation only works on a subVI that uses temporary buffers and whose values are not passed on in some way.
- For example, a large array in an uninitialized Shift Register is not a temporary buffer. The array must be maintained in memory so that the next call sees the previous value.
- Values that are passed out of the subVI's Connector Pane are not temporary buffers.
- Queues and Data Value References take over memory allocation to avoid creating copies. Therefore, these do not create a temporary copy of the data that can be deallocated.
The attached files (saved for LabVIEW 2018) demonstrate how to properly use the
Request Deallocation function.