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: 

XControl In TypeDef Won't Unload

This is giving me fits.  If you have a typedef that contains an XControl (or contains a cluster that contains an XControl).

Then when you load a VI that has an instance of the typedef, two instances of the XControl will be instantiated: one owned by the typedef, and the other owned by the VI.  The problem is that when the VI is unloaded, only its instance of the XControl is unloaded.  The other instance remains in memory, and it forces the typedef to remain in memory.  Is there a workaround for this?

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 1 of 2
(801 Views)

I was able to solve this by making two changes:

  1. I changed the control type from 'typedef' to 'control'.
  2. I disconnected it from its owning .lvclass.
"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 2
(758 Views)