mlua-rs / rlua

High level Lua bindings to Rust
Other
1.73k stars 115 forks source link

Fix issue #292: Leak with LuaJIT. #293

Closed jugglerchris closed 10 months ago

jugglerchris commented 10 months ago

We were not resetting the allocator back to the default when closing the state, which was preventing LuaJIT from fully cleaning up.

Also check that the lua state is not null before we try to do anything with it.