mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 10:55:45 +00:00
common/wall_clock: Add virtual destructors
From -fsanitize=address, this code wasn't calling the proper destructor. Adding virtual destructors for each inherited class and the base class fixes this bug. While we are at it, mark the functions as final.
This commit is contained in:
parent
e61d8de5f6
commit
a66d8bb49d
3 changed files with 4 additions and 2 deletions
|
@ -13,6 +13,8 @@ namespace Common {
|
|||
|
||||
class WallClock {
|
||||
public:
|
||||
virtual ~WallClock() = default;
|
||||
|
||||
/// Returns current wall time in nanoseconds
|
||||
[[nodiscard]] virtual std::chrono::nanoseconds GetTimeNS() = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue