public void release(){
  if (mMediaPlayer != null) {
    if (mMediaPlayer.isPlaying()) {
      mMediaPlayer.stop();
    }
    mMediaPlayer.reset();
    mMediaPlayer.release();
  }
  mMediaPlayer=null;
}

public void release ( ) { if ( mMediaPlayer != null ) { if ( mMediaPlayer . isPlaying ( ) ) { mMediaPlayer . stop ( ) ; } mMediaPlayer . reset ( ) ; mMediaPlayer . release ( ) ; } mMediaPlayer = null ; }
a helper function to release the media player and remove it from memory
