mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-10-29 06:31:56 +00:00
Reduce memory usage
This commit is contained in:
1 parent
1aae252fc3
commit
590a5236bb
1 file changed
+1
-1
@@ -142,7 +142,7 @@ func newSandboxedState() *glua.LState {
|
||||
// Capture preload before package is hidden; require() reads loaders from the registry.
|
||||
module := L.GetGlobal(glua.LoadLibName).(*glua.LTable)
|
||||
preload := module.RawGetString("preload").(*glua.LTable)
|
||||
loaders := L.NewTable()
|
||||
loaders := L.CreateTable(1, 0)
|
||||
loaders.RawSetInt(1, L.NewFunction(func(L *glua.LState) int {
|
||||
name := L.CheckString(1)
|
||||
loader := preload.RawGetString(name)
|
||||
|
||||
Reference in new issue
Block a user