Destroy all components at once

Destroy all components at once

Hello,

I want to destroy all components. I have an application that uses Log in and Log out, so when the user Logs out I need to destroy all windows that the user leaved active. The problem is that the application has a lot of windows son I don't want to do this...

I question whether Scott's approach is what the OP wants, destroying the entire viewport -- that seems a bit drastic.

Instead it appears that when a user logs out, they just want to destroy a number of windows the user may have open. My suggestion then is to store references to the open windows in a MixedCollection, or better yet a plain old Javascript object or array. Presuming that an array is used and it is named openWindows, then it would be a matter of something such as: