diff --git a/apps/openmw/mwlua/luamanagerimp.cpp b/apps/openmw/mwlua/luamanagerimp.cpp index 2dfb5dbc35..e856372ee7 100644 --- a/apps/openmw/mwlua/luamanagerimp.cpp +++ b/apps/openmw/mwlua/luamanagerimp.cpp @@ -644,7 +644,6 @@ namespace MWLua outMemSize(mLua.getTotalMemoryUsage()); out << "\n"; out << "LuaUtil::ScriptsContainer count: " << LuaUtil::ScriptsContainer::getInstanceCount() << "\n"; - out << "LuaUi::Content count: " << LuaUi::Content::getInstanceCount() << "\n"; out << "\n"; out << "small alloc max size = " << smallAllocSize << " (section [Lua] in settings.cfg)\n"; out << "Smaller values give more information for the profiler, but increase performance overhead.\n"; diff --git a/components/lua_ui/content.cpp b/components/lua_ui/content.cpp index 01dfe9faf6..fd1b56d427 100644 --- a/components/lua_ui/content.cpp +++ b/components/lua_ui/content.cpp @@ -11,11 +11,4 @@ namespace LuaUi::Content throw std::logic_error("Expected function"); return metatable["new"].get(); } - - int64_t View::sInstanceCount = 0; - - int64_t getInstanceCount() - { - return View::sInstanceCount; - } } diff --git a/components/lua_ui/content.hpp b/components/lua_ui/content.hpp index 85c8a3a8fc..c3da9e7365 100644 --- a/components/lua_ui/content.hpp +++ b/components/lua_ui/content.hpp @@ -15,27 +15,13 @@ namespace LuaUi::Content class View { public: - static int64_t sInstanceCount; // debug information, shown in Lua profiler - // accepts only Lua tables returned by ui.content explicit View(sol::table table) : mTable(std::move(table)) { if (!isValid(mTable)) throw std::domain_error("Expected a Content table"); - sInstanceCount++; - } - View(const View& c) - { - this->mTable = c.mTable; - sInstanceCount++; } - View(View&& c) - { - this->mTable = std::move(c.mTable); - sInstanceCount++; - } - ~View() { sInstanceCount--; } static bool isValid(const sol::object& object) { @@ -123,8 +109,6 @@ namespace LuaUi::Content static inline size_t toLua(size_t index) { return index + 1; } static inline size_t fromLua(size_t index) { return index - 1; } }; - - int64_t getInstanceCount(); } #endif // COMPONENTS_LUAUI_CONTENT