Here's one more question!!
How would you manage a module with more than one lua files?
For example, my Unitframe (which I made with oUF) is made up of five different lua files called:
- api.lua: Holds 24 local functions to create a unitframe
- core.lua: Responsible for style registration and actual unitframe spawning
- group.lua & unit.lua: Nothing really special
- unitframe.lua: Being a core part of module (Those AceAddon-3.0 functions, :OnInitialize(), :OnEnable() & :OnDisable() functions are called here)
If the module is disabled, those 24 local functions and function calls on core.lua becomes useless, but occupies memory.
What would be the best practice for this case?