LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unregister for Events leaves Callback-VIs loaded

Solved!
Go to solution

I'm usinge the C# Class NotifyIcon to get my application into the system tray bar of windows. Since I use this function, most classes get locked after running the application.

 

I found, that all loaded callback vis remain locked after running the application, therefore some typedefs are locked, therefore some classes are locked, therefore allmost all classes are locked.

I found the same problem with this example: https://decibel.ni.com/content/docs/DOC-9161

 

In LV 2010 SPI1 it works fine, but in LV 2014 SPI1 the VI CallbackVI.vi remains locked after running and stoping HandlingEventsInLabVIEW.vi. Also if you close HandlingEventsInLabVIEW.vi first and then CallbackVI.vi (both without any project) the 'GettingStarted' Window wil not appear and you need to kill Labview.

 

Since the problem appears in LV 2014, not in 2010 (I don't have other versions) I assume a problem with LV 2014 itself.

Any suggestions?

0 Kudos
Message 1 of 2
(2,904 Views)
Solution
Accepted by topic author HolgerKuehn

I believe you can unlock these by calling the GC.Collect method (should be in mscorlib\system) at the end of your code.


___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(2,894 Views)