Open audax opened 8 years ago
When
+ import com.squareup.leakcanary.LeakCanary;
public void onCreate() {
super.onCreate();
+ LeakCanary.install(this);
Log.d(TAG, "onCreate");
and
+ debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta2'
or
+ compile 'com.squareup.leakcanary:leakcanary-android:1.4-beta2'
are enough, like shown on the page, than its either not leaking, or not working. I testet in via emulator, more testing may be required.
@audax How did you come to the conclusion that we leak memory? Did you have any OutOfMemory errors?
There are references to the MainActivity in the fragments and even in AsyncTasks that sit in OnClickHandlers. There are also some log messages from the system about a leaked activity or service connection.
I think there is a little more setup required to find leaking Fragments: https://github.com/square/leakcanary/wiki/FAQ
https://github.com/square/leakcanary
Because we leak like the titanic.