Brilliant coding language and so fast too!.
It's an Interpreted Scripter, and has terrible performance compared to it's predecessor (which is still available for free).
f the user closes the windows using [X] option, does it close without allowing me to free up all reserved memory? (which aint much).
This seems to be an oddly common concern in Modern Programmers... but it's a baseless concern.
At least when it comes to Modern Operating Systems.
Don't worry even Microsoft' Development Network., still teaches proper garbage collection etiquette when programming in C++/CX but it's actually unnecessary on Windows 7 or later; which use Smart Memory Management.
In the last post about this... I explained it akin to when you're at work.
So, let's say you make yourself a Coffee in the Break Room; well it's just good etiquette to then clean up after yourself and put everything back in the cupboards.
Then the Break Room is how you found it, and the next person who wants to use it knows where everything is because it's back where it should be.
How Smart Memory Management works., is that every few hours... you basically have a Cleaner who comes through and will always do this; should they not see anyone else using the Break Room.
On top of this other Staff Members will also (should it be a complete and unusable state for them), clean up before; so they can use it.
Older versions of the OS., well there was no "Cleaner" and other Staff Members would just take one look at the Untidy Memory and be like "Nope... Bob made this mess., he can clean it up! I'll just stop working until that happens."
How something like AppGameKit differs from C++., is well you're not actually interacting with anything yourself... it's a bit like you're a child with a Parent / Guardian.
So, if you want a snack or drink; you're asking them (AGK Player in this case), and they'll handle everything for you, including the clean up.
Of course you can still keep your own little workspace clear and clean if you want., but it isn't necessary.
Now with all this said... there isn't actually ANYTHING you can do in AppGameKit (well not without using a Plug-In., but then it's up to the Library Developer to handle Garbage Collection) that will allow something to stay resident when the program is closed abruptly.
?
In other words... don't worry.
Clicking "X" (Close)., pressing Alt-F4 or using the "End" Command in AppGameKit Script; will all produce the same result.
All committed memory / resources will be freed up for you.