????????
????Android???й??????????????????????OOM?????????????У???????????????????????android???????????????????????й????OOM??????????????????μ?????й?????????????????MAT??Щ???????????Щ??????????й???????????????????????????????????渲??????????渲????????Щ????????????????????????????????????й???????????ж?λ???????????????git????????????????LeakCanary?????????LeakCanary??????????
?????????
????1.????
??????????Android Studio(AS)
??????????????????????
????2.???????
????2.1??build.gradle
??????????????????
????debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
????releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
????????????????£?gradle????????????????????п??????????ù?????磨???????????Σ???????????????????vpn???????????1????????????
????2.2??Application.class????LeakCanary
????????androidManifest????????application???????????????????androidManifest????
???????д??oncreate()?????м?????????????
????LeakCanary.install(this);
????2.3??????????
???????????app??????????????а????????app

????2.4????apk
???????????????????????????????й???????toast???????dump????
??????leak app??????????????????й????????????toast?????????????????????????????leak app?????

??????????嶨λ??????tread??activtiy???????????heap dump???????mat???????
?????????????????????????????????MainGridActivity???????й?
????2.5??share?Щ???????
??????????share heap dump???

??????git?????????????dump??.hprof?????sdcard/Download/leakcanary???£???????????adb shell????в???????pull??pc???????з???
???????
?????????????????????????????????????????????????????й????????????????????????????????????????????????????????????????????????????п????????????????????????????????????????????????й??????????????????????о??????????????????????1???