- add :ClearNamespace, which will be used by sublibraries when upgrading.

This commit is contained in:
ckknight
2008-03-28 21:32:51 +00:00
parent 9536ce48a9
commit bca34b3d92
2 changed files with 22 additions and 1 deletions

View File

@ -468,4 +468,16 @@ function DogTag:ADDON_LOADED()
end
end
function DogTag:ClearNamespace(namespace)
if type(namespace) ~= "string" then
error(("Bad argument #2 to `ClearNamespace'. Expected %q, got %q"):format("string", type(namespace)), 2)
end
Tags[namespace] = nil
AddonFinders[namespace] = nil
self.EventHandlers[namespace] = nil
self.TimerHandlers[namespace] = nil
clearCodes(namespace)
collectgarbage('collect')
end
end