Global leaks everywhere. SETGLOBALs - you want to fix those ASAP, a lot of these have REALLY generic names, plus it's inefficient.
Code:
main <DKOne.lua:0,0> (488 instructions, 1952 bytes at 007F7BB0)
[14] SETGLOBAL 0 -8 ; SLASH_DKOne1
[15] SETGLOBAL 0 -10 ; SLASH_DKOne2
[16] SETGLOBAL 0 -12 ; SLASH_DKOne3
[18] SETGLOBAL 0 -7 ; DKOne
[173] SETGLOBAL 60 -137 ; DKOneDKStatus
[176] SETGLOBAL 60 -138 ; DKOneDKPlayerStats
[1674] SETGLOBAL 71 -170 ; PrintRuneStatus
[1683] SETGLOBAL 71 -171 ; pairsByKeys
[1701] SETGLOBAL 71 -172 ; tprint
[1714] SETGLOBAL 71 -173 ; PrintDB
[1717] SETGLOBAL 71 -174 ; PrintStat
[1720] SETGLOBAL 71 -175 ; PrintPlayerStat
[1723] SETGLOBAL 71 -176 ; PrintaL
[1726] SETGLOBAL 71 -177 ; OpenOptions
function DKOne:ConstructDB() <DKOne.lua:191,244> (205 instructions, 820 bytes at 007F8720)
[193] SETGLOBAL 1 -1 ; DKOneDB
function events:ACTIVE_TALENT_GROUP_CHANGED() <DKOne.lua:1168,1203> (72 instructions, 288 bytes at 0047D358)
[1199] SETGLOBAL 1 -29 ; ASDebuff
[1200] SETGLOBAL 1 -30 ; PDRDebuff
function DKOne:Redraw() <DKOne.lua:1390,1530> (832 instructions, 3328 bytes at 0047D510)
[1408] SETGLOBAL 3 -24 ; fontFlags
[1415] SETGLOBAL 3 -24 ; fontFlags
function tprint (tbl, indent) <DKOne.lua:1701,1712> (39 instructions, 156 bytes at 0047DB98)
[1704] SETGLOBAL 7 -3 ; formatting
Code:
main <abilities.lua:0,0> (1703 instructions, 6812 bytes at 00797BB0)
[276] SETGLOBAL 9 -263 ; DKOneAbilityList
Code:
main <options.lua:0,0> (252 instructions, 1008 bytes at 003E7BB0)
[1704] SETGLOBAL 73 -40 ; DKOneOptions
function CreateOptionsPanel() <options.lua:654,683> (153 instructions, 612 bytes at 0045DC00)
[655] SETGLOBAL 0 -1 ; OptionsPanel
function CreateOptionsPanelAD() <options.lua:795,871> (718 instructions, 2872 bytes at 0045DDB8)
[796] SETGLOBAL 0 -1 ; OPAD
function CreateOptionsPanelLB() <options.lua:953,1006> (479 instructions, 1916 bytes at 00485910)
[954] SETGLOBAL 0 -1 ; OPLB
function CreateOptionsPanelRot() <options.lua:1065,1114> (387 instructions, 1548 bytes at 00485CD8)
[1067] SETGLOBAL 0 -1 ; OPRot
function CreateOptionsPanelDoc() <options.lua:1128,1219> (350 instructions, 1400 bytes at 00485E90)
[1129] SETGLOBAL 0 -1 ; OPDoc
[1218] SETGLOBAL 1 -238 ; OPDocLegend
function CreateOptionsPanelRF() <options.lua:1512,1701> (2502 instructions, 10008 bytes at 004860A0)
[1513] SETGLOBAL 0 -1 ; OPRF
Code:
main <rotation.lua:0,0> (1690 instructions, 6760 bytes at 002C7BB0)
[1935] SETGLOBAL 62 -277 ; DKOneActionList
[1938] SETGLOBAL 62 -278 ; DKOneActionCDList
There's also a large amount of GETGLOBAL leaks, but as those are merely inefficient (but won't lead to any mystery errors the way leaked SETGLOBALs can), that's lower priority. I can dump them for you, too.
---------- Post added 2012-05-15 at 08:41 AM ----------
Second glance, a few of these globals are because you want to share functions/data between files. You can use the addon table for that. Access it by doing:
Code:
local addonTable = select(2,...)