Skip to content

Commit

Permalink
Compile LeakCanary to detected Memory Leak,Fix a Memory Leak in Netwo…
Browse files Browse the repository at this point in the history
…rkBannerActivity
  • Loading branch information
zhangpan-alo7 committed Aug 14, 2019
1 parent e2800a8 commit c82a610
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@ dependencies {
api 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
api 'io.reactivex.rxjava2:rxandroid:2.1.0'
api 'com.squareup.okhttp3:logging-interceptor:3.10.0'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-beta-2'
implementation project(path: ':ideahttp')
}
3 changes: 3 additions & 0 deletions app/src/main/java/com/example/zhpan/circleviewpager/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
import com.example.zhpan.circleviewpager.imageloader.ImageLoaderManager;
import com.zhpan.idea.utils.Utils;

import leakcanary.AppWatcher;
import leakcanary.LeakCanary;

/**
* <pre>
* Created by zhangpan on 2019-08-14.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,10 @@ public void onSuccess(List<BannerData> response) {
}
});
}

@Override
protected void onDestroy() {
super.onDestroy();
mBannerViewPager.stopLoop();
}
}

0 comments on commit c82a610

Please sign in to comment.