vendredi 29 mai 2015

Use ApplicationContext if possible in Android?

Is it a good practice to use application context instead of other context(Activity, Service and so on) if possible? Pros:

  1. Application context can help us avoid memory leak.
  2. Application context can help eliminate params in some circumstances
  3. Other things don't come to my head for now

Cons:

No clue for me after googling for a while and this is where this question from.

Aucun commentaire:

Enregistrer un commentaire