Core/Vmaps: Replace manual reference counting with shared_ptr and slightly reduce memory use by deduplicating model name strings

This commit is contained in:
Shauren
2024-07-04 22:56:00 +02:00
parent fd329ee848
commit ff4fc1ad4e
9 changed files with 87 additions and 105 deletions

View File

@@ -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)
{