Skip to content

Commit

Permalink
add one more release memory point
Browse files Browse the repository at this point in the history
mSurfaceHolder.removeCallback(this);
mSurfaceHolder = null;
  • Loading branch information
af913337456 authored Nov 29, 2017
1 parent d10ec15 commit 9499637
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ public boolean isPlaying() {
public void release() {
mTargetState = STATE_RELEASED;
mCurrentState = STATE_RELEASED;
try{
mSurfaceHolder.removeCallback(this);
mSurfaceHolder = null;
}catch (Exception ignore){}
if (mMediaPlayer != null) {
try {
mMediaPlayer.release();
Expand Down

0 comments on commit 9499637

Please sign in to comment.