1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-05-27 22:47:48 +02:00

CBankInfo: fix huge memory leak that appear in long run

This commit is contained in:
ArseniyShestakov 2015-12-14 11:26:14 +03:00
parent 1ec7d14637
commit 9f565b81e9
2 changed files with 5 additions and 5 deletions

View File

@ -325,10 +325,10 @@ void CBankInstanceConstructor::configureObject(CGObjectInstance * object, CRando
} }
} }
CBankInfo::CBankInfo(JsonVector config): CBankInfo::CBankInfo(const JsonVector & Config):
config(config) config(Config)
{ {
assert(!config.empty()); assert(!Config.empty());
} }
static void addStackToArmy(IObjectInfo::CArmyStructure & army, const CCreature * crea, si32 amount) static void addStackToArmy(IObjectInfo::CArmyStructure & army, const CCreature * crea, si32 amount)

View File

@ -156,9 +156,9 @@ typedef std::vector<std::pair<ui8, IObjectInfo::CArmyStructure>> TPossibleGuards
class DLL_LINKAGE CBankInfo : public IObjectInfo class DLL_LINKAGE CBankInfo : public IObjectInfo
{ {
JsonVector config; const JsonVector & config;
public: public:
CBankInfo(JsonVector config); CBankInfo(const JsonVector & Config);
TPossibleGuards getPossibleGuards() const; TPossibleGuards getPossibleGuards() const;