title: Android TextView Memory Leakage
body: <p>I am developing a Music Application, in which a Seekbar is being used. I have one method which handles the seekbar performance, and which works well. but if seekbar is in action there is a memory leakage and the Log cat shows like </p>
  
  <pre><code>GC_CONCURRENT freed 1692K, 34% free 10759K, paused 3ms+8ms
  </code></pre>
  
  <p>this is coming continuously when the seekbar is progressing</p>
  
  <p>i found that the problem is due to the updation of TextView, dynamically, which is to show the current duration of song.</p>
  
  <p>how can i fix that. please help me for this issue</p>
  
  <p>My function is </p>
  
  <pre><code>public void seekbarProgress(){
  
          handler.postDelayed(new Runnable() {
              @Override
              public void run() {
  
                  //current position of the play back 
                  currPos = harmonyService.player.getCurrentPosition();
                  if(isPaused){
                      //if paused then stay in the current position
                      seekBar.setProgress(currPos);
                      //exiting from method... player paused, no need to update the seekbar
                      return;
                  }
  
                  //checking if player is in playing mode
                  if(harmonyService.player.isPlaying()){
                      //settting the seekbar to current positin
                      seekBar.setProgress(currPos);
                      //updating the cuurent playback time
                      currTime.setText(getActualDuration(""+currPos));
                      handler.removeCallbacks(this);
                      //callback the method again, wich will execute aftr 500mS
                      handler.postDelayed(this, 500);
                  }
                  //if not playing...
                  else{
                      //reset the seekbar
                      seekBar.setProgress(0);
                      //reset current position value
                      currPos = 0;
                      //setting the current time as 0
                      currTime.setText(getActualDuration(""+currPos));
                      Log.e("seekbarProgress()", "EXITING");
                      //exiting from the method
                      return;
                  }
              }
          }, 500);
      }
  </code></pre>