I use this code to get values from SharedPreferences.public static String getSharedPreferenceValue(Context context, String key) {    SharedPreferences sp = context.getSharedPreferences(    Utility.PREFERENCES_NAME, Context.MODE_PRIVATE);    String value = sp.getString(key, Utility.EMPTY_STRING);    return value;}Will this static method keep context (Activity) all time and are there memory leaks?Is there a better way to get values from SharedPreferences?I'm looking for the best way to do this.
Getting a value from shared preferences
java;performance;android