| 4 | namespace Star { |
| 5 | |
| 6 | LuaRoot::LuaRoot() { |
| 7 | auto& root = Root::singleton(); |
| 8 | m_scriptCache = make_shared<ScriptCache>(); |
| 9 | |
| 10 | restart(); |
| 11 | |
| 12 | m_rootReloadListener = make_shared<CallbackListener>([cache = m_scriptCache]() { |
| 13 | cache->clear(); |
| 14 | }); |
| 15 | root.registerReloadListener(m_rootReloadListener); |
| 16 | |
| 17 | m_storageDirectory = root.toStoragePath("lua"); |
| 18 | } |
| 19 | |
| 20 | LuaRoot::~LuaRoot() { |
| 21 | shutdown(); |
nothing calls this directly
no test coverage detected