- 1
Do not place Android context classes in static fields; this is a memory leak
Do not place Android context classes in static fields; this is a memory leak. package com.HSS.raagmala.db; //import android.annotation.SuppressLint; import android.app.Application; import android.content.Context; import android.view.LayoutInflater; public class DBAccess extends Application { public static LayoutInflater inflater; //@SuppressLint("StaticFieldLeak") public static Context context; @Override public void onCreate(){ super.onCreate(); context.getApplicationContext(); inflater= (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); }
8th May 2022, 4:50 AM
Chinmayi Dongre

0 Answers
Often have questions like this?
Learn more efficiently, for free:
Hot today
Not getting desired output
0
Votes
Java
0
Votes
Text editor and advice
2
Votes
Microbit !
0
Votes
Help me Secure the Vote!
1
Votes
I HATE MY LIFE
0
Votes
Is there any kotlin courses here
0
Votes