Samsung Samsung memory leak in EditText

I detected a memory leak using Samsung devices. If any activity has an EditText , this activity will flow. To show this, I created small test applications.

The first Activity (called MyActivity ) contains EditText and Button . By clicking the button, you call the finish () first of Activity and open the second.

 @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); findViewById(R.id.goTo)).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); Intent intent = new Intent(MyActivity.this, AnotherActivity.class); startActivity(intent); } }); } 

When I do the second activity, I take hprof. From the memory analyzer, I see that MyActivity leaked due to a link from InputMethodManager

Screenshot from Memory Analyzer

This issue only occurs on Samsung S III and Tab devices. Thus, there is no leak in the device of Xperia P and others. Please help get around this error.

+2
android memory memory-leaks
source share

No one has answered this question yet.

See similar questions:

fifteen
EditText causes a memory leak
5
AndroidTextText memory leak

or similar:

3606
Close / hide Android soft keyboard
3295
Why is the Android emulator so slow? How can we speed up Android emulator development?
3288
Correct use cases for Android UserManager.isUserAGoat ()?
3044
Creating a memory leak using Java
2735
Stop EditText from getting focus when starting Activity
2609
Is there a unique identifier for an Android device?
1146
performSelector may cause a leak because its selector is unknown
1042
As a result, a window leaked that was originally added
12
Why EditText maintains its activity context in an ice cream sandwich
5
AndroidTextText memory leak

All Articles