JDialog의 dispose의 의미요...
보슬
다이얼로그 객체에
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
와 같은 종료x버튼의 이벤트를 할당하였는데 문득 궁금해지는게.....
dispose가 되면 다이얼로그 객체 자체만 null 이 되는건지
아니면 다이얼로그 안에 들어있던, 예를 들어 다이얼로그 안에 JTextArea같은게 있었다고 하면 이런 것들도 전부 자동으로 null로 자원반환이 되는건지 궁금하네요..
후자라면 해줘야할게 따로 없겠지만
만약에 전자라면... 일일히 다이얼로그 내에 있는 컴포넌트 객체들을 null로 셋해줘야할것같아서요..
api문서에 의하면 dispose() 메소드는 다음과 같은데...빨간색 부분이제가 말하는 후자에 해당되는건지.....??
Releases all of the native screen resources used by this Window, its subcomponents, and all of its owned children. That is, the resources for these Components will be destroyed, any memory they consume will be returned to the OS, and they will be marked as undisplayable.
조언 부탁드립니다^^
-
Addicted
그렇군요..ㅎㅎ
-
내길
후자요
-
나츠
아마도.. 후자가 맞는듯 싶네요.. ㅎㅎ 해석해보면 ㅎ
-
그놈은멋있었다
네. 후자가 맞아요.