issue #196 GC upvalue/thread cycle test reverted to 5.3 version due to difference in behaviour in Lua 5.4 (as up-values are not reference counted anymore).

cmake
Dibyendu Majumdar 3 years ago
parent 4acc325c97
commit 2f76a1e869

@ -536,10 +536,14 @@ do
local co = coroutine.create(f)
assert(coroutine.resume(co, co))
end
-- Now, thread and closure are not reacheable any more.
-- Now, thread and closure are not reacheable any more;
-- two collections are needed to break cycle
-- Note that this is consistent with Lua 5.3 (reference counted up-values)
-- but in 5.4 the first collection below fires the finaliser
collectgarbage()
-- FIXME
--assert(collected)
assert(not collected)
collectgarbage()
assert(collected)
collectgarbage("restart")
end

Loading…
Cancel
Save