Closed ckaotik closed 11 years ago
If you're interested in the findglobals script, you can find it here: http://www.wowace.com/addons/findglobals/
Very epic! I saw that not too long ago, but ever got a chance to run it! I'll look into patching those leaks
For reference later, these seem to be the big ones.
tonumber select string _G time print abs floor math unpack type format
lowHealth lowMana [1161] arg1 [2221][228] loadstacktracker [1559] f [1586] collectgarbage [1645] _ [2156] gflags
I ran the script again against xCT+ beta 5 with the following results (I excluded obvious globals, such as LibStub and API calls):
function X:OnInitialize() <core.lua:25,53>
[26] GETGLOBAL 1 -2 ; ct -- this is not used later on and doesn't seem initialized?
[26] GETGLOBAL 1 -2 ; ct
[26] GETGLOBAL 1 -2 ; ct
function ItemToggleAll(info) <core.lua:113,118>
[115] GETGLOBAL 3 -2 ; self -- these should be X.db.<things> instead of self.db.<things>
[116] GETGLOBAL 6 -2 ; self
These seem to be the only issues, yay!
Oh right, "ct" is a global that gets leaked in Affli's version of xCT as per 1.9f? I have it there in case it's defined, I stop loading the addon. (To prevent confusion with other addons, I perform two more checks to make sure I know what it is).
Hey, I just ran findglobals against xct.lua and it found quite a few "issues" ;) While API calls shouldn't worry you, some variables like _, f, lowHealth or lowMana with such a commonly used name shouldn't fly around freely in the global variable namespace.
So here's the dump: