두 활동이있는 응용 프로그램이 있다고 가정 유출활동
final Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler();
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(....);
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler()
{
@Override
public void uncaughtException(Thread thread, Throwable ex)
{
}
});
}
활동 B는 약간의 비트 맵을로드 그것의 공용 영역을 위해. 종료시 이전 디폴트 캐치되지 않은 예외 핸들러를 복원하지 않습니다. A -> B -> A -> B ...를 수행하면 활동 B가 누출되어 메모리 부족 예외가 발생합니다. 정확히 B 액이 유출 된 이유는 무엇입니까?