I've read a couple of discussions on when to use activity and when to use application context (e.g. on this SO post).
I'm wondering what the implications of using either activity or application context are for the method Toast.makeText().
The documentation only briefly says for parameter context
:
Context: The context to use. Usually your Application or Activity object.
My questions are
- When using the activity context is the toast's duration bound to the activity lifecycle?
- Are memory leaks a serious issue here? They seem to be limited by the duration of the toast.
What else is to be considered?