Created
March 10, 2017 18:12
-
-
Save Magdi/df718289f576a50fd7e5ecbce5aff58e to your computer and use it in GitHub Desktop.
leakcanary Application class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExampleApplication extends Application { | |
@Override public void onCreate() { | |
super.onCreate(); | |
if (LeakCanary.isInAnalyzerProcess(this)) { | |
// This process is dedicated to LeakCanary for heap analysis. | |
// You should not init your app in this process. | |
return; | |
} | |
LeakCanary.install(this); | |
// Normal app init code... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment