Fixed memory leak in ExecutingAttack.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
fcc6f2214e
commit
a9740cb1eb
|
@ -57,7 +57,10 @@ namespace CreatureLib::Battling {
|
||||||
ExecutingAttack(const ExecutingAttack&) = delete;
|
ExecutingAttack(const ExecutingAttack&) = delete;
|
||||||
ExecutingAttack& operator=(const ExecutingAttack&) = delete;
|
ExecutingAttack& operator=(const ExecutingAttack&) = delete;
|
||||||
|
|
||||||
virtual ~ExecutingAttack() noexcept { delete _script; };
|
virtual ~ExecutingAttack() noexcept {
|
||||||
|
delete _script;
|
||||||
|
delete[] _hits;
|
||||||
|
};
|
||||||
|
|
||||||
HitData& GetHitData(Creature* creature, uint8_t hit) {
|
HitData& GetHitData(Creature* creature, uint8_t hit) {
|
||||||
for (size_t i = 0; i < _targets.Count(); i++) {
|
for (size_t i = 0; i < _targets.Count(); i++) {
|
||||||
|
|
Loading…
Reference in New Issue