我具有单击按钮时要调用的这段代码。
当我离开应用程序并返回该应用程序时,我想查看更新时间。
我的问题是,如果我不打handler.removeCallbacks(runnable)
会导致内存问题/内存泄漏吗?
handler.post(new Runnable() {
@Override
public void run() {
time = (System.currentTimeMillis() - startTime) + stoppedTime;
textView.setText((time));
handler.post(this);
}
});