Closed euclidianAce closed 3 years ago
Ideally this should be compatible for 5.1-5.4+JIT so no uservalues to hold a reference to the required objects.
Minimal example: iterating over the matches of a query done 'inline' to a for loop causes it to be garbage collected
for match in parser:query[[ ... ]]:match(node) do collectgarbage() end
will segfault often, whereas
local q = parser:query[[ ... ]] for match in q:match(node) do collectgarbage() end
wont, due to the alive reference to q
q
Ideally this should be compatible for 5.1-5.4+JIT so no uservalues to hold a reference to the required objects.
Minimal example: iterating over the matches of a query done 'inline' to a for loop causes it to be garbage collected
will segfault often, whereas
wont, due to the alive reference to
q