Address memory leak

This commit is contained in:
Alexander Montag 2024-09-25 17:34:44 +00:00
parent aed8892760
commit b8259c6ee7
3 changed files with 2 additions and 3 deletions

View File

@ -597,7 +597,7 @@ TaskTree::TaskTree() {
tree->set_drag_forwarding(callable_mp(this, &TaskTree::_get_drag_data_fw), callable_mp(this, &TaskTree::_can_drop_data_fw), callable_mp(this, &TaskTree::_drop_data_fw));
tree_search = memnew(TreeSearch);
tree_search.instantiate();
vbox_container->add_child(tree_search->search_panel);
}

View File

@ -46,7 +46,7 @@ private:
bool editable;
bool updating_tree;
HashMap<RECT_CACHE_KEY, Rect2> probability_rect_cache;
TreeSearch * tree_search;
Ref<TreeSearch> tree_search;
struct ThemeCache {
Ref<Font> comment_font;

View File

@ -60,7 +60,6 @@ private:
protected:
static void _bind_methods();
void _process_shortcut_input(const Ref<InputEvent> &p_event);
public:
TreeSearchMode get_search_mode();