From af16893ec414c383469f677c308417ce49658ebe Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 3 Aug 2024 19:52:00 +0300 Subject: [PATCH] implement custom dialog destroy method --- src/Entity/Browser/Container/Page/Auth.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Entity/Browser/Container/Page/Auth.php b/src/Entity/Browser/Container/Page/Auth.php index be017ab8..85fe7a3b 100644 --- a/src/Entity/Browser/Container/Page/Auth.php +++ b/src/Entity/Browser/Container/Page/Auth.php @@ -219,13 +219,13 @@ class Auth } - $this->gtk->destroy(); + $this->destroy(); return true; } // Dialog canceled - $this->gtk->destroy(); + $this->destroy(); return false; } @@ -247,4 +247,13 @@ class Auth } } } + + public function destroy(): void + { + // Free memory + $this->_options = []; + + // Destroy GTK object + $this->gtk->destroy(); + } } \ No newline at end of file