mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
Check for reference leak detection only in mlua integratin tests.
This is not necessary an error and should not be enforced by default. Fixes #268.
This commit is contained in:
@@ -247,6 +247,8 @@ impl Drop for LuaInner {
|
||||
{
|
||||
(*ffi::lua_callbacks(self.state())).userdata = ptr::null_mut();
|
||||
}
|
||||
// This is an internal assertion used in integration tests
|
||||
#[cfg(mlua_test)]
|
||||
mlua_debug_assert!(
|
||||
ffi::lua_gettop(extra.ref_thread) == extra.ref_stack_top
|
||||
&& extra.ref_stack_top as usize == extra.ref_free.len(),
|
||||
|
||||
Reference in New Issue
Block a user