Background process wont clear memory. Is it a good idea to kill my own process on Android?
I have an app that has a widget. In the main app, I have an ad framework (cannot be edited due to licence) that is accumulatively leaking approx 1MB every time I exit the app. It appears one of its threads are running in the background (unnecessarily) that will keep its process and these threads will be created again when I lau开发者_如何学Cnch the app.
Is it a good idea to call
android.os.Process.killProcess(android.os.Process.myPid());
in the onDestroy method of my main activity?
Also, would doing this kill my widget's service as well?
you can use the intent concept to use the background processing or u can also develop service that will be executing your third party framework in background.
精彩评论