The new NativeProcess availability is very cool! Amazing things can be achieved with this technology. But there's a big problem with it on InDesign and Illustrator. The close event of CSXSWindowedApplication is not fired when the panel is closed on these hosts.
Though, in InDesign it's fired when the panel is actually closed, it's not, when the panel being shrunk! So, for example, when I have a lengthy process in ActionScipt, and I have a NativeProcess running - I cannot stop it, when the panel is hidden. I cannot stop neither the panel's process, nor the NativeProcess - they both continue to run when the panel being shrunk in InDesign and even if it's closed in Illustrator.