diff --git a/src/object_rep.cpp b/src/object_rep.cpp index a8d990e7..c0e9d8d0 100755 --- a/src/object_rep.cpp +++ b/src/object_rep.cpp @@ -91,6 +91,9 @@ namespace luabind { namespace detail instance->release_dependency_refs(L); instance->~object_rep(); + + lua_pushnil(L); + lua_setmetatable(L, 1); return 0; }