GC away some one-use initialization functions after they are run.

This commit is contained in:
Xinhuan
2009-08-08 17:36:33 +08:00
parent 5f8a470f48
commit 98d138a111
+8
View File
@@ -460,6 +460,8 @@ function Omen:CreateFrames()
else
self.FocusButton:GetFontString():SetTextColor(0.5, 0.5, 0.5, 1)
end]]
self.CreateFrames = nil
end
function Omen:OnInitialize()
@@ -473,10 +475,12 @@ function Omen:OnInitialize()
LSM.RegisterCallback(self, "LibSharedMedia_Registered", "UpdateUsedMedia")
-- These 2 functions self GC after running
self:CreateFrames()
self:SetupOptions()
self:RegisterEvent("PLAYER_LOGIN")
self.OnInitialize = nil
end
function Omen:PLAYER_LOGIN()
@@ -575,6 +579,8 @@ function Omen:PLAYER_LOGIN()
self.optionsFrames["FuBar"] = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("Omen", L["FuBar Options"], self.versionstring, "FuBar")
self:UpdateFuBarSettings()
end
self.PLAYER_LOGIN = nil
end
function Omen:OnEnable()
@@ -1865,6 +1871,8 @@ function Omen:SetupOptions()
self:RegisterModuleOptions("OmenSlashCommand", self.OptionsSlash, L["Slash Command"])
self:RegisterModuleOptions("Profiles", function() return LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db) end, L["Profiles"])
self.optionsFrames.Help = ACD3:AddToBlizOptions("Omen", L["Help File"], self.versionstring, "Help")
self.SetupOptions = nil
end
function Omen:RegisterModuleOptions(name, optionTbl, displayName)