浏览代码

Merge pull request #103793 from Rindbee/fix-memory-leak-caused-by-hidden-tooltip-controls

Fix memory leak caused by hidden tooltip controls
Thaddeus Crews 5 月之前
父节点
当前提交
41a3098fb5
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/main/viewport.cpp

+ 1 - 0
scene/main/viewport.cpp

@@ -1505,6 +1505,7 @@ void Viewport::_gui_show_tooltip() {
 	// This way, the custom tooltip from `ConnectionsDockTree` can create
 	// its own tooltip without conflicting with the default one, even an empty tooltip.
 	if (base_tooltip && !base_tooltip->is_visible()) {
+		memdelete(base_tooltip);
 		return;
 	}