@ OP: You can't free the memory that is occupied by the default interface. Even if you set it to nil all you are doing is deleting the pointer that points to that memory address. Every frame you (or the game client) creates will stay in memory until the UI is reloaded. So if you want to "get rid" of something all you can do is unhook all events/scripts and hide it.
And here is another tip for free:
LUA uses a garbage collection. That means everything you "throw away" will be freed once a certain threshold is met. So to make your addon better performance wise don't do
- Code: Select all
- local array = {"Test","LoL","12345"}
 array = {}
to clear it.
Do
- Code: Select all
- local array = {"Test","LoL","12345"}
 for _,v in pairs(array) do
 v = nil
 end
Author of 
LunaUnitFrames - The most advanced unit frames for classic WoW. Visit my 
GitHub page for them and some other tools i wrote.
Rhyna - Warrior | Nost PvP | Alliance