Android Question What I hate about Android

Discussion in 'Android Questions' started by Hamo, Jun 10, 2015.

  1. Hamo

    Hamo Member Licensed User

    When I exit a program I like to think that it's completely gone from memory so that if the tablet subsequently develops a fault I can be sure it's not due to some fragments of my program still lurking in the background. Is there really no way to ensure a program and all its data terminates fully and is gone 100% when exited ?
    Hamo
     
  2. Cableguy

    Cableguy Expert Licensed User

    To my knowledge, the android OS manages the processes itself.
    When an app is paused (backgrounded) for a long time, the OS will eventually kill it.
    Even Activity. Finish does not terminate completely the app, but it does liberate a few more resources, and gets killed by the OS quicker.
     
    lemonisdead likes this.
  3. Hamo

    Hamo Member Licensed User

    There should be something like Activity.KillThisAppForGood to completely remove all traces of the program immediately
    including all local, global and any other types of variables and release any resources used by the app.
    As I said before I hate the fact that you can't exit a program completely.
    Hamo
     
  4. thedesolatesoul

    thedesolatesoul Expert Licensed User

    If you make sure you stop all your services and apply Activity.Finish on all activities when they exit, you can ensure that you have no more runnable code that will impact the device.
    You should also be aware that activities will not be able to run code when in the background.
    The fact that you have unremoved variables lurking in device memory should make absolutely no impact on the running device.
     
    walterf25 likes this.
  5. Hamo

    Hamo Member Licensed User

    OK, thanks for the replies
    Hamo
     
Loading...