hi
first of all: if possible create references only once at start and use the same reference during the whole runtime of your app. always close references in reversed order than they have been created. you should look for all references you obtained by properties of other objects, like "controls[]", "decorations[]" etc. you have to close ALL these references, even those unused by your app (i forgot to close the references obtained by "controls[]" from a clusters reference). Search for this topic in this forum or in the online documentation.
when closing the panel without catching the "Panel close?" event the loop is just interrupted without a chance to execute any code behind the loop (like clearing stuff, closing references and so on...).
good luck
chris
Best regards
chris
CL(A)Dly bending G-Force with LabVIEW
famous last words: "oh my god, it is full of stars!"