lua Code:
local framepool = {}
local function removeframe(f)
f:Hide()
tinsert(framepool, f)
end
local function getframe()
local f = tremove(framepool)
if not f then
--Create your frame here and assign it to f
else
--revert any unique changes you may have made to the frame before sticking it in the framepool
end
return f
end
Something like that as a very basic example