View Single Post
10-29-09, 04:32 AM   #4
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
lua Code:
  1. local framepool = {}
  2.  
  3. local function removeframe(f)
  4.     f:Hide()
  5.     tinsert(framepool, f)
  6. end
  7.  
  8. local function getframe()
  9.     local f = tremove(framepool)
  10.     if not f then
  11.         --Create your frame here and assign it to f
  12.     else
  13.         --revert any unique changes you may have made to the frame before sticking it in the framepool
  14.     end
  15.     return f
  16. end

Something like that as a very basic example
  Reply With Quote