From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Request Deallocation Function

I have taken over a LabVIEW program with over 500 VIs.

 

The former programmer uses Request Deallocation Function in numerous places.

 

Good, bad, indifferent?

 

 

0 Kudos
Message 1 of 3
(2,018 Views)

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.

0 Kudos
Message 2 of 3
(1,995 Views)

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."

Message 3 of 3
(1,987 Views)