Or create single frames with their component parts as keys on the frame.
Lua Code:
local frameA = CreateFrame("Frame", nil, UIParent)
frameA.Button1 = CreateFrame("Button", nil, frameA)
frameA.Texture1 = frameA:CreateTexture()
frameA.SubFrame1 = CreateFrame("Frame", nil, frameA))
frameA.SubFrame1.Button1 = CreateFrame("Button", nil, frameA.SubFrame1)
1 local used.