Originally Posted by Torhal
That does nothing for frames but clear their table members. The frame itself still exists, and will always exist until the UI is reloaded or you re-start WoW. Tables CAN be garbage-collected. Frames, though they are a special form of table, CANNOT.
|
So basicly the closest you can get is like this:
lua Code:
local function deleteframe(f)
if not f.DeletedEvent then
f.DeletedEvent = f.OnEvent
f:Hide()
f.OnEvent = function() end
end
end
local function restoreframe(f)
if f.DeletedEvent then
f:Show()
f.OnEvent = f.DeletedEvent
f.DeletedEvent = nil
end
end