Fixed probable memory leak in ServerTestActivity

This commit is contained in:
PeratX 2017-04-11 12:23:42 +08:00
parent e01ad796cd
commit 0b29f27be4

View File

@ -140,6 +140,17 @@ public class ServerTestActivity extends AppCompatActivity {
mHandler.setViews(startTestBut, textViewTestInfo);
}
@Override
protected void onDestroy() {
super.onDestroy();
if (mThread != null) {
mThread.interrupt();
mThread = null;
}
mHandler = null;
}
public static class ServerTestHandler extends Handler {
private Button startTestBtn = null;
private TextView textViewTestInfo = null;