Hi David, Unfortunately Bruce's answer isn't applicable to VBScript; we can only guess. My guess is that yes, the interpreter does clear all memory used by an app when it closes. As for an event which executes when your app closes, there's an event hidden away in the clientInFormation object named onShutdown (it would be nice of the manual had a "see also" section, and in this case if the onQuit event would reference the onShutdown event; more than once I've wished for "see also" help). here's a little example: x=connectevent(clientinformation, "onShutdown", "onShutdown") sub onShutdown() clipboard.appendText "onShutdown was called" end sub I don't believe you can do something such as put up a dialog or open a message box in the onShutdown event, I believe WE will soon kill your app and those will go away. Don't forget, if you are covering all bases, you may need to look into the onError event, which will fire if your app has an error (in which case, I'm not sure if onShutdown will fire). hth, Chip ________________________________
From: David [mailto:[email protected]] Sent: Friday, June 15, 2012 7:07 PM To: [email protected] Subject: OnQuit When connecting to the OnQuit Event, I do understand I can create a sub, named things like OnQuit. Here, I could do a bit of house cleaning for my app. But from what I can read in the Reference manual, it seems this event only does fire when WE as a total is closing down. Am I understanding it correct? If so, is there a way for me to do house cleaning, even if a user turns off the app itself, but keeps WE running? Any Event that fires, when an app is stopped or being disabled? Another techie thing: Say my app is using 10Kb of memory for different objects and stuff. I try to be in a habit of always setting objects that are not in use to NOTHING. But imagine my app being poorly designed, not doing this kind of nullifying. If now the user stop the app - in the app manager - and then restart the app. Will the app be using the SAME physical 10kb of memory, or will it create allocations for new 10kb? I.e, if the app is stopped and restarted 100 times, will it still only allocate the same memory, or will there be a risk of memory usage building up? Hope this makes sense.
