View Single Post
03-26-16, 05:07 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Is there a reason why you can't combine both loops to make it easier on the CPU?
Lua Code:
  1. function TDButton_DestroyAllOverlays()
  2.     local frame;
  3.     for key, frame in pairs(TDButton_Frames) do
  4.         frame:GetParent().tdOverlays = nil;
  5.         frame:ClearAllPoints();
  6.         frame:Hide();
  7.         frame:SetParent(UIParent);
  8.         frame.width = nil;
  9.         frame.height = nil;
  10.  
  11.         tinsert(TDButton_FramePool, frame);
  12.         TDButton_Frames[key] = nil;
  13.     end
  14. end
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote