0
어리석은 질문 일 수도 있지만 이해할 수 없습니다 ...
다음과 같은 점에서 차이가 있습니까? 메모리 낭비 등의 문제가 있습니까?자체 참조 대 독립형 서브 클래스에 대한 콜백
class A implements Handler.Callback {
// is it OK to pass the loopback reference into the Handler in this case?
Handler mHandler = new Handler(this);
public boolean handleMessage(Message msg) {
...
}
}
class B {
Handler mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
...
}
};
}
고마워요!