mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Fixed memory leak in CObjectClassesHandler
This commit is contained in:
parent
e7f2858d33
commit
e26384062f
@ -94,6 +94,12 @@ CObjectClassesHandler::CObjectClassesHandler()
|
||||
#undef SET_HANDLER
|
||||
}
|
||||
|
||||
CObjectClassesHandler::~CObjectClassesHandler()
|
||||
{
|
||||
for(auto p : objects)
|
||||
delete p.second;
|
||||
}
|
||||
|
||||
std::vector<JsonNode> CObjectClassesHandler::loadLegacyData(size_t dataSize)
|
||||
{
|
||||
CLegacyConfigParser parser("Data/Objects.txt");
|
||||
|
@ -211,6 +211,7 @@ class DLL_LINKAGE CObjectClassesHandler : public IHandlerBase
|
||||
ObjectContainter * loadFromJson(const JsonNode & json, const std::string & name);
|
||||
public:
|
||||
CObjectClassesHandler();
|
||||
~CObjectClassesHandler();
|
||||
|
||||
std::vector<JsonNode> loadLegacyData(size_t dataSize) override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user