Quantcast

Memory leak

Scott Sibley [08-20-10 - 02:35]
Memory leak
Filename
Modules/Text.lua
StarTip.lua
diff --git a/Modules/Text.lua b/Modules/Text.lua
index 9400257..54c99bf 100644
--- a/Modules/Text.lua
+++ b/Modules/Text.lua
@@ -440,8 +440,10 @@ function mod:UPDATE_FACTION()
 end

 local linesToDraw = {}
+local tbl
 local function updateFontString(widget, fontString)
-	tinsert(linesToDraw, {widget, fontString})
+	tbl = StarTip.new(widget, fontString)
+	tinsert(linesToDraw, tbl)
 end

 do
@@ -455,7 +457,7 @@ do
 			fontString:SetText(widget.buffer)

 			if widget.color.script then
-				c = mod.evaluator.ExecuteCode(environment, widget.widget.name, widget.color.script)
+				c = mod.evaluator.ExecuteCode(environment, widget.widget.name .. ".color.script", widget.color.script)
 			end

 			if type(c) == "table" then
diff --git a/StarTip.lua b/StarTip.lua
index 4a80e74..0708c69 100644
--- a/StarTip.lua
+++ b/StarTip.lua
@@ -189,10 +189,6 @@ do
 			newtbl = true
 			t = {...}
 		end
-		local count = 0
-		for k, v in pairs(pool) do
-			count = count + 1
-		end
 		t.__starref__ = true
 		return t, newtbl
 	end