aboutsummaryrefslogtreecommitdiff
path: root/src/common/Collision/Models/GameObjectModel.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-07-04 22:56:00 +0200
committerOvahlord <dreadkiller@gmx.de>2024-07-05 04:43:39 +0200
commit0a1d2c7813fdb7bc588543262ab124cc94cc47f4 (patch)
treea9319cdaae7b8ad6c89f0856096eba0262a2701f /src/common/Collision/Models/GameObjectModel.cpp
parent8d9e1e663e2e62d91365f61f373c3a1466607c69 (diff)
Core/Vmaps: Replace manual reference counting with shared_ptr and slightly reduce memory use by deduplicating model name strings
(cherry picked from commit ff4fc1ad4e91e3da9cd8c011f30473a19a3d47bd)
Diffstat (limited to 'src/common/Collision/Models/GameObjectModel.cpp')
-rw-r--r--src/common/Collision/Models/GameObjectModel.cpp6
1 files changed, 1 insertions, 5 deletions
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<GameObjectModelOwnerBase> modelOwner, std::string const& dataPath)
{