From ff4fc1ad4e91e3da9cd8c011f30473a19a3d47bd Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 4 Jul 2024 22:56:00 +0200 Subject: Core/Vmaps: Replace manual reference counting with shared_ptr and slightly reduce memory use by deduplicating model name strings --- src/common/Collision/Models/GameObjectModel.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/common/Collision/Models/GameObjectModel.cpp') diff --git a/src/common/Collision/Models/GameObjectModel.cpp b/src/common/Collision/Models/GameObjectModel.cpp index f2b19e038fa..24e9489326e 100644 --- a/src/common/Collision/Models/GameObjectModel.cpp +++ b/src/common/Collision/Models/GameObjectModel.cpp @@ -93,11 +93,7 @@ bool LoadGameObjectModelList(std::string const& dataPath) return true; } -GameObjectModel::~GameObjectModel() -{ - if (iModel) - VMAP::VMapFactory::createOrGetVMapManager()->releaseModelInstance(iModel->GetName()); -} +GameObjectModel::~GameObjectModel() = default; bool GameObjectModel::initialize(std::unique_ptr modelOwner, std::string const& dataPath) { -- cgit v1.2.3