diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-07-04 22:56:00 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-07-04 22:56:00 +0200 |
commit | ff4fc1ad4e91e3da9cd8c011f30473a19a3d47bd (patch) | |
tree | a37fc61a59a39520a88d024846a900c63988a0b0 /src/common/Collision/Models/GameObjectModel.cpp | |
parent | fd329ee8483da81585db484c005a6fe22448bc63 (diff) |
Core/Vmaps: Replace manual reference counting with shared_ptr and slightly reduce memory use by deduplicating model name strings
Diffstat (limited to 'src/common/Collision/Models/GameObjectModel.cpp')
-rw-r--r-- | src/common/Collision/Models/GameObjectModel.cpp | 6 |
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) { |