AGK releases all the resources automatically as it is a managed system. As was suggested higher up, if you want to capture the moment the iOS app ends, you will need to dive into Objective C to add a function call in which you can store any data you need to hold on to. You have highlighted an important feature not present in the universal T1 command set which is the question of what to do when the user prematurely terminates the app and you want to keep hold of all that last minute data. Traditionally you would have your data live on a cloud server so instant termination of the app client would not cause data to be lost, but where local data is concerned I can see the need. The problem is how to introduce an 'event' or 'callback' in what is a traditional sequential BASIC language?
I drink tea, and in my spare time I write software.