VI Analyzer Enthusiasts Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Test - Useless Close Reference

This test returns a failure for any Close Reference function wired to a GObject reference. The GObject class contains Panel and Diagram, along with any object that can reside on a panel or diagram (control, constant, node, structure, wire, terminal, etc.)

 

As I explain in Brainless LabVIEW, there is no need to close GObject references. In fact, the function itself is a no-op when a GObject reference is wired.

 

This test is saved in LabVIEW 2015. Follow the instructions here to install and use this test.

DNatt, LV R&D
Comments
Member croohcifer
Member

Hey Darren,

 

In Brainless LabVIEW, you call out many GObject refs that don't need to be closed, but when I analyze the following VI, the Useless Close Reference test only flags the top Close Reference:

 

Capture.PNG

 

It doesn't complain about the bottom three close refs.  Is this an oversight in the plugin, or should I really be closing the bottom three refs?

 

Thanks!

David

Example Gatekeeper
Example Gatekeeper

I agree with your assessment, the VI Analyzer test should be flagging those bottom three Close References as useless. I won't be able to update the test for a while, so if you (or anybody else reading this) wants to take a stab at updating the test to detect those additional scenarios, that would be great!

DNatt, LV R&D
Contributors