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
09609dd50e
commit
771a9c21cc
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