Skip to content

Commit

Permalink
测试内存泄漏
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuoSmall committed Aug 21, 2018
1 parent a501e5c commit b8f6b33
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
4 changes: 3 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ dependencies {
def androidDependencies = rootProject.ext.androidDependencies
def dataDependencies = rootProject.ext.dataDependencies
annotationProcessor viewDependencies.apt_butterKnife
//debugCompile dataDependencies.leakcanary
implementation viewDependencies.butterKnife
implementation androidDependencies.recyclerView
implementation viewDependencies.DanmakuFlameMaster
Expand Down Expand Up @@ -102,4 +101,7 @@ dependencies {

//implementation "com.shuyu:gsyVideoPlayer-ex_so:$gsyVideoVersion"


debugImplementation dataDependencies.leakcanary

}
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ private String getUrl() {
//String url = "ijkhttphook:https://res.exexm.com/cw_145225549855002";

//
// String url = "http://7xjmzj.com1.z0.glb.clouddn.com/20171026175005_JObCxCE2.mp4";
String url = "http://hjq-1257036536.cos.ap-shanghai.myqcloud.com/m3u8/m1/out2.m3u8";
String url = "http://7xjmzj.com1.z0.glb.clouddn.com/20171026175005_JObCxCE2.mp4";
//String url = "http://hjq-1257036536.cos.ap-shanghai.myqcloud.com/m3u8/m1/out2.m3u8";
//String url = "http://223.110.243.138/PLTV/2510088/224/3221227177/index.m3u8";
//String url = "http://qiniu.carmmi.com/image/132451525666042.mp4";
//String url = "http://ucp.wn.sunmath.cn/file-upload/gYQJHxK9iNQKJeWyS/V80418-103803.mp4?rc_uid=7sCFCGoaF2iTc9vH9&rc_token=prJK-xGutKmy2LDQO-OZASjob0o1u_s3e5SgMHmgjtn";
Expand Down
13 changes: 6 additions & 7 deletions app/src/main/java/com/example/gsyvideoplayer/GSYApplication.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.example.gsyvideoplayer;

import android.app.Application;
import android.support.multidex.MultiDexApplication;

import com.shuyu.gsyvideoplayer.GSYVideoManager;
Expand All @@ -14,7 +13,7 @@
import tv.danmaku.ijk.media.exo2.Exo2PlayerManager;
import tv.danmaku.ijk.media.exo2.ExoPlayerCacheManager;

//import com.squareup.leakcanary.LeakCanary;
import com.squareup.leakcanary.LeakCanary;

/**
* Created by shuyu on 2016/11/11.
Expand All @@ -25,12 +24,12 @@ public class GSYApplication extends MultiDexApplication {
@Override
public void onCreate() {
super.onCreate();
//if (LeakCanary.isInAnalyzerProcess(this)) {
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);
return;
}
LeakCanary.install(this);

//GSYVideoType.enableMediaCodec();
//GSYVideoType.enableMediaCodecTexture();
Expand All @@ -44,12 +43,12 @@ public void onCreate() {

//GSYVideoType.setShowType(GSYVideoType.SCREEN_MATCH_FULL);
//GSYVideoType.setShowType(GSYVideoType.SCREEN_TYPE_FULL);
//GSYVideoType.setShowType(GSYVideoType.SCREEN_MATCH_FULL);

//GSYVideoType.setRenderType(GSYVideoType.SUFRACE);
//GSYVideoType.setRenderType(GSYVideoType.GLSURFACE);

//IjkPlayerManager.setLogLevel(IjkMediaPlayer.IJK_LOG_SILENT);

//GSYVideoType.setShowType(GSYVideoType.SCREEN_MATCH_FULL);
}
}
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ext {
floatWindow = '1.0.6'

//DataLibraries
leakcanary = '1.5'
leakcanary= '1.6.1'

imageLoader = '4.0.0'

Expand Down

0 comments on commit b8f6b33

Please sign in to comment.