mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
Fix memory leaks from DeckLoader usage (#5665)
* add comment * stack allocate DeckLoader for loading tags * deckModel now takes ownership of DeckLoader * fix remaining * add comment
This commit is contained in:
parent
87c5d07807
commit
e1964f21de
7 changed files with 33 additions and 8 deletions
|
|
@ -764,6 +764,10 @@ void TabSupervisor::talkLeft(TabMessage *tab)
|
|||
removeTab(indexOf(tab));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new deck editor tab
|
||||
* @param deckToOpen The deck to open in the tab. Creates a copy of the DeckLoader instance.
|
||||
*/
|
||||
TabDeckEditor *TabSupervisor::addDeckEditorTab(const DeckLoader *deckToOpen)
|
||||
{
|
||||
auto *tab = new TabDeckEditor(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue