Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Context context;
- public void setContext(Context context) {
- this.context = context;
- }
- lateinit var context: Context
- object Singleton {
- lateinit var context : Context
- }
- Do not place Android context classes in static fields (static reference to `Singleton` which has field `context` pointing to `Context`); this is a memory leak
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement