|
Actually I think you can remove frames if they were created from LUA code. When you want to remove it, just call frame:Hide() on it and then set it to nil. Then just call the garbage collector.
Example:
local MyFrame = CreateFrame("Frame", "MyFrameName", UIparent)
MyFrame:Hide()
MyFrame = nil
collectgarbage()
I currently use this in one of my addons. I monitored memory usage and without the collectgarbage() call, memory usage keeps building up. Use it and your frame is collected by the garbage collector
|