View Single Post
04-17-20, 04:25 PM   #6
Milton
A Murloc Raider
Join Date: Apr 2020
Posts: 4
Originally Posted by Fizzlemizz View Post
In this instance, "get rid of" doesn't mean dispose and release resources, it just means, "not see" and avoid some possible future problems with new frames.

Setting the parent to nil just releases it from the strictures of being a child of it's current parent (following scale, hide state etc.).
When do I "reuse" a frame? I ended up creating many frames like this

local tar_btn = CreateFrame("Button", nil, UIParent, "SecureActionButtonTemplate")
So they don't have a 'name' property, and they all have the same... tar_btn - I don't know what to call this, the name of each frame's table?

They all behave like different frames - each one appears and disappears as needed and they can all be on the screen at the same time - so I don't know how would I be reusing the same frame instead of creating a new one (with its appropriate resources) every time.
  Reply With Quote