Author Topic: jPCT-AE HELLO WORLD 3D Engine doesn't close  (Read 3134 times)

Offline nnyerges

  • byte
  • *
  • Posts: 18
    • View Profile
jPCT-AE HELLO WORLD 3D Engine doesn't close
« on: September 28, 2014, 02:17:16 am »
Hi
Is there any method to close/dispose/kill/ or what ever to stop de 3d engine from running after application close?

1. Open Hello-World example on your device
2. Move the cube and note the las position
3. Close the application by pressing back
4. Open it again and the cube its in the same position. The application never close?
Maybe i miss something
Chears...

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: jPCT-AE HELLO WORLD 3D Engine doesn't close
« Reply #1 on: September 28, 2014, 10:40:32 am »
That's not a bug. It's the way which Android is supposed to work. If you really want to close the app (albeit there's almost never a real reason to do so...), you can add a call to System.exit(0) to the onStop() method for example. But as said: Why would you want to?

Offline nnyerges

  • byte
  • *
  • Posts: 18
    • View Profile
Re: jPCT-AE HELLO WORLD 3D Engine doesn't close
« Reply #2 on: September 29, 2014, 07:33:46 pm »
Thank's..Sorry, you are right, its not a bug. I just understand the use of the "copy(master)" on the HelloWorld-AE example. About not closing an application, just a simple question: ... is not consuming more memory on the device?. Why I should leave HelloWorld-AE paused in the background?

Edited:

By the way, calling System.exit(0); on the onStop() method, !solves! the emulator's Fatal signal 11 (SIGSEGV) error
« Last Edit: September 29, 2014, 07:57:09 pm by nnyerges »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: jPCT-AE HELLO WORLD 3D Engine doesn't close
« Reply #3 on: September 29, 2014, 08:16:04 pm »
Android will dispose the app by itself if the system needs the memory back. In most cases, there's no need to interfere with this. Which signal 11 error, btw?

Offline nnyerges

  • byte
  • *
  • Posts: 18
    • View Profile
Re: jPCT-AE HELLO WORLD 3D Engine doesn't close
« Reply #4 on: October 01, 2014, 05:03:02 pm »
Egon, I have only one month learning to program android and your forum is helping me a lot. Thank you for the information.

About de error, please read post http://www.jpct.net/forum2/index.php/topic,3987.msg29027.html#msg29027

Chears,
Nicolás