06-21-2018 04:16 PM
I have taken over a LabVIEW program with over 500 VIs.
The former programmer uses Request Deallocation Function in numerous places.
Good, bad, indifferent?
06-21-2018 05:29 PM - edited 06-21-2018 05:29 PM
There's a good discussion on its use and merits here: https://forums.ni.com/t5/LabVIEW/request-deallocation/td-p/266658. It does depend on how its used however in a number of cases calling it may actually do nothing (since it only claims unused space).
Its possible the previous programmer was a bit paranoid. Is your application is working with large data sets or continually requesting large allocations?
Besides a bit of performance hit when it preemptively garbage collects (which might not be necessary) I don't see that there is any harm from its use.
06-21-2018 05:44 PM
It is typically not needed and can make things worse.
Quote from here:
""request deallocation" is often a bad idea, especially if the same subVI is called again with the same datasize. it is much cheaper if it can hold on to the allocated data instead of deallocation and then allocate again with the next call."
Also this post give a perspective.
Also a rolfk quote:
"Request Deallocation is not a tool that should be used normally. It does in most situations not do what you think it should do, and in many cases makes your VI slower."