fix: memory leak in UnitAura and bump version to 1.4.2

This commit is contained in:
Bluewhale1337
2026-07-18 10:36:54 +02:00
parent 0186fc1d93
commit ce594af5fa
+11 -7
View File
@@ -115,13 +115,6 @@ function HealBot_CheckBuffs(unit)
end
end
function HealBot_OnEvent_UnitAura(this, unit)
local DebuffType;
if HealBot_Heals[unit] and unit ~= "target" then
HealBot_UnitIcons[unit] = {}
local iconCount = 0
local HealBot_TrackedHoTs = {
["Interface\\Icons\\Spell_Holy_Renew"] = true,
["Interface\\Icons\\Spell_Nature_Rejuvenation"] = true,
@@ -132,6 +125,17 @@ function HealBot_OnEvent_UnitAura(this, unit)
["Interface\\Icons\\btnholyscriptures"] = true,
}
function HealBot_OnEvent_UnitAura(this, unit)
local DebuffType;
if HealBot_Heals[unit] and unit ~= "target" then
if not HealBot_UnitIcons[unit] then
HealBot_UnitIcons[unit] = {}
end
for j = 1, 5 do
HealBot_UnitIcons[unit][j] = nil
end
local iconCount = 0
local i = 1;
while true do
local debuff, tmp, debuff_type = UnitDebuff(unit, i, 1)