Fixes memory leak.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
parent
51897e42da
commit
7354c835e6
|
@ -26,7 +26,7 @@ namespace CreatureLib::Battling {
|
|||
bool _hasEnded = false;
|
||||
BattleResult _battleResult = BattleResult::Empty();
|
||||
EventHook _eventHook;
|
||||
HistoryHolder* _historyHolder = new HistoryHolder();
|
||||
ArbUt::UniquePtr<HistoryHolder> _historyHolder = new HistoryHolder();
|
||||
|
||||
uint32_t _currentTurn = 0;
|
||||
|
||||
|
@ -115,7 +115,7 @@ namespace CreatureLib::Battling {
|
|||
try_creature(this->_historyHolder->Register<T>(this->GetCurrentTurn(), args...);
|
||||
, "Exception occurred during history element registration.");
|
||||
}
|
||||
const HistoryHolder* GetHistory() const noexcept { return _historyHolder; }
|
||||
const HistoryHolder* GetHistory() const noexcept { return _historyHolder.GetRaw(); }
|
||||
|
||||
long GetLastTurnTimeMicroseconds() const noexcept { return _lastTurnTime; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue