lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Soni L. <fakedme@gmail.com> 于2018年11月27日周二 上午10:53写道:
>
> Has anyone made a reentrant Lua GC, to allow garbage collection within __gc metamethod?
>
> I could really use this, but it doesn't seem to be a thing.

I think you can minimize the __gc metamethod , just putting the dead
object to a table in __gc . And call the destructor of objects by
iterating this table in main loop.


-- 
http://blog.codingnow.com