Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / clearing app content

Author
Message
haliop
User Banned
Posted: 13th May 2013 10:14
ok so in DarkGDK i used to delete everything at the end of the program
but here... the last command is loop .. so i guess that ends the app..

how can i remove all content?
how does it works on mobiles?

if i close an app on my iphone and returns to the main screen its still running in the background but only when i close it from the active apps menu with the small X button i guess it removes everything from memory... can you explain how it works?
and how one implents it in code?

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th May 2013 10:35
Quote: " the last command is loop .. so i guess that ends the app.."

Loop doesn't end anything except a loop control structure.

As far as I'm aware, once the window is closed, all memory it used is destroyed. There's nothing extra you need to code to do this, it's automatic.

On iphone, not sure if an application is able to kill itself completely without the user manually killing it from the task menu. I think that's just how iOS works.

"You're all wrong. You're all idiots." ~Fluffy Rabbit
haliop
User Banned
Posted: 13th May 2013 10:47
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th May 2013 16:43
In theory, everything should clear up.

But, you can delete all your stuff manually after the last loop command.

And there is an explicit command "end" which stops the program.

So, before I switched to Tier 2, I would have a function call after the last loop to a function that deleted all the images, sounds and sprites. Then I would explicitly call "end".

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th May 2013 18:20
But you can only call that if the user closes the app the way you expect. Unless there's a way to detect when they close it from the 'X' or ALT+F4 or task manager.

"You're all wrong. You're all idiots." ~Fluffy Rabbit
haliop
User Banned
Posted: 13th May 2013 18:26
aha.. well i would like the core team to answer that so it would be clear.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th May 2013 19:13
As far as we know, there is no way (in Tier 1 anyway) to detect when an app is going to close down, regardless of platform. Then it is up to the core AppGameKit stuff to cleanly shut down.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-05-06 13:03:57
Your offset time is: 2024-05-06 13:03:57