mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
free memory pool on tab close
This commit is contained in:
parent
48c682459d
commit
e77fec1f1c
1 changed files with 12 additions and 0 deletions
|
|
@ -70,6 +70,7 @@ class Tab
|
|||
$page->title->getValue(),
|
||||
$page->title->getSubtitle()
|
||||
);
|
||||
|
||||
} else throw new Exception;
|
||||
|
||||
// Keep current selection
|
||||
|
|
@ -95,6 +96,17 @@ class Tab
|
|||
?GtkWidget $child,
|
||||
int $page_num
|
||||
) {
|
||||
// Free memory pool
|
||||
if ($page = $this->get($page_num))
|
||||
{
|
||||
if ($page->connection)
|
||||
{
|
||||
$page->connection->close();
|
||||
}
|
||||
|
||||
} else throw new Exception;
|
||||
|
||||
// Reorder pages
|
||||
$this->reorder();
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue