Frames don't get disposed/garbage collected. You should re-use the same frame where possible.
The global name of the first frame created with the same name is stored so you would need to keep track of any frames created yourself, most commonly by adding the reference to a table, or use unique names.
Lua Code:
local MyButtons = {} -- Storage
local function CreateButton(id)
local f = CreateFrame("Button", "MiltonActionButton"..id, UIParent, "SecureActionButtonTemplate") -- Create your button(s)
tinsert(MyButtons, f) -- and add to storage
...
end
local function HideButtons()
for i=1, #MyButtons do -- Hide them all
MyButtons[i]:Hide()
end
end