Skip to content

Commit

Permalink
Fix potential memory leak with not releasing attacher, thanks to @k3b
Browse files Browse the repository at this point in the history
  • Loading branch information
Jawnnypoo committed Jul 26, 2016
1 parent 41f28c1 commit fdf8149
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
Expand Down
1 change: 1 addition & 0 deletions library/src/main/java/uk/co/senab/photoview/PhotoView.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ public void setOnSingleFlingListener(PhotoViewAttacher.OnSingleFlingListener onS
@Override
protected void onDetachedFromWindow() {
mAttacher.cleanup();
mAttacher = null;
super.onDetachedFromWindow();
}

Expand Down

0 comments on commit fdf8149

Please sign in to comment.