View Single Post
05-04-17, 07:12 AM   #18
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
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?
  Reply With Quote