1

Friends, I am trying to clear the application using this code,

Intent intent = new Intent(Intent.ACTION_MAIN);
            intent.addCategory(Intent.CATEGORY_HOME);
            startActivity(intent);

But sometimes, I find the app is still consuming the RAM, any better way to free the RAM.

  • 1
    Don't do it. Android works best when it's left to manage memory for itself. There is no need for you to "free the RAM". – Simon Oct 16 '12 at 12:42

1 Answers1

4

Leave it. Let the system manage platform resources by itself. Simply pay attention to your app internal memory management (which usually means "do not leak" and "do not overallocate") and leave the rest to Android. Like it or not, but you can't do this any better anyway nor you'd benefit from trying.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141