How do I delete an object referenced by a dialog?

后端 未结 8 2616
独厮守ぢ
独厮守ぢ 2021-02-14 11:42

I created a dialog with a jpanel inside it, and that jpanel will be still referenced if I get rid of the dialog. I want to destroy that dialog and everything in it when I click

8条回答
  •  耶瑟儿~
    2021-02-14 12:30

    If you want to delete the assign that object reference to null, so that when Garbage Collector runs for the next time it can destroy the object thinking it is not getting referenced.

提交回复
热议问题