How to judge a C# object is Null in ToLua

In lua, we generally interpret whether a C# object is Null by interpreting whether userdata is equal to nil, but sometimes it is clear that the object has been deleted, but the judgment result is still not deleted. We can also judge by the following method

function IsNil(uobj)
    return uobj == nil or uobj:Equals(nil)
end

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325498542&siteId=291194637