public static void Destroy(Lua.lua_State L, LWF.Button obj) { int objectId = -1; if (objectIdentifiers[L].TryGetValue(obj, out objectId)) { objectIdentifiers[L].Remove(obj); objects[L].Remove(objectId); } }