mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
CBankInfo: fix huge memory leak that appear in long run
This commit is contained in:
parent
1ec7d14637
commit
9f565b81e9
@ -325,10 +325,10 @@ void CBankInstanceConstructor::configureObject(CGObjectInstance * object, CRando
|
||||
}
|
||||
}
|
||||
|
||||
CBankInfo::CBankInfo(JsonVector config):
|
||||
config(config)
|
||||
CBankInfo::CBankInfo(const JsonVector & Config):
|
||||
config(Config)
|
||||
{
|
||||
assert(!config.empty());
|
||||
assert(!Config.empty());
|
||||
}
|
||||
|
||||
static void addStackToArmy(IObjectInfo::CArmyStructure & army, const CCreature * crea, si32 amount)
|
||||
|
@ -156,9 +156,9 @@ typedef std::vector<std::pair<ui8, IObjectInfo::CArmyStructure>> TPossibleGuards
|
||||
|
||||
class DLL_LINKAGE CBankInfo : public IObjectInfo
|
||||
{
|
||||
JsonVector config;
|
||||
const JsonVector & config;
|
||||
public:
|
||||
CBankInfo(JsonVector config);
|
||||
CBankInfo(const JsonVector & Config);
|
||||
|
||||
TPossibleGuards getPossibleGuards() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user