Release Queue

Releases a reference to a queue.

1378

Inputs/Outputs

datatype_icon

queue

A reference to a queue.

datatype_icon

force destroy

A Boolean value that determines whether to release all references to the queue.

Releasing all references to a queue destroys the queue, which deletes any elements in the queue and invalidates all references to the queue.
Note You can also destroy a queue by stopping all VIs that use the queue reference.
True The node releases all references to the queue.
False The node only releases the specified reference to the queue. This does not destroy the queue unless a reference to the queue has only been obtained once.

Default value: False

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Default value: No error

datatype_icon

queue name

The name of the queue, if the queue is named.

datatype_icon

remaining elements

The array of elements that were in the queue before the node released the queue.

The first element in the array is the element from the front of the queue, and the last element in the array is the element from the back of the queue.

The data type of the array elements changes to match the data type of the queue elements.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Programming Patterns

Transferring Data Between Loops Using Queue Nodes

Releasing Multiple References to the Same Queue

If you obtain a reference to the same queue multiple times, you can release multiple references to that queue by calling Release Queue up to the same number of times that you obtained the reference. Releasing all references to a queue destroys the queue and deletes any elements in the queue.

If you are not using a loop to release references as they are obtained or otherwise keeping track of the number of times you obtain a reference, you can also destroy a queue with a single Release Queue node using force destroy?.