mirror of
https://github.com/TermoraDev/termora.git
synced 2026-01-15 18:02:58 +08:00
fix: memory leaks
This commit is contained in:
@@ -92,6 +92,9 @@ class TermoraFrameManager : Disposable {
|
||||
window.addWindowListener(object : WindowAdapter() {
|
||||
override fun windowClosed(e: WindowEvent) {
|
||||
|
||||
// 销毁子窗口
|
||||
TermoraRestarter.getInstance().disposeChildren(window)
|
||||
|
||||
// 存储位置信息
|
||||
saveFrameRectangle(window)
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ class TermoraRestarter {
|
||||
Disposer.dispose(instance)
|
||||
}
|
||||
|
||||
private fun disposeChildren(window: Window) {
|
||||
fun disposeChildren(window: Window) {
|
||||
for (win in Window.getWindows()) {
|
||||
if (win is JDialog) {
|
||||
if (win.owner == window) {
|
||||
|
||||
Reference in New Issue
Block a user