performance: tooltip memory usage

This commit is contained in:
Salikh Gurgenidze
2026-01-24 02:47:27 +04:00
parent 06615cf96e
commit 5376f0f0ef
6 changed files with 35 additions and 45 deletions
+3 -12
View File
@@ -45,22 +45,13 @@ end
--=====================================================
-- Tooltip Scanning Helpers
-- Uses shared tooltip from Utils module
--=====================================================
-- Get or create the scanning tooltip
local scanTooltip = nil
local function GetScanTooltip()
if not scanTooltip then
scanTooltip = CreateFrame("GameTooltip", "GudaItemDetectionTooltip", nil, "GameTooltipTemplate")
scanTooltip:SetOwner(WorldFrame, "ANCHOR_NONE")
end
return scanTooltip
end
-- Scan tooltip and return all text lines
local function ScanTooltipLines(bagID, slotID, itemLink)
local tooltip = GetScanTooltip()
local tooltipName = "GudaItemDetectionTooltip"
-- Use shared tooltip from Utils module
local tooltip, tooltipName = addon.Modules.Utils:GetScanTooltip()
-- Ensure tooltip owner is set before each scan
tooltip:SetOwner(WorldFrame, "ANCHOR_NONE")