From 01559b662eece2b57a5fbd235bb25237f787f9c4 Mon Sep 17 00:00:00 2001 From: Dmitry Vedenko Date: Wed, 27 Mar 2024 12:11:28 +0300 Subject: [PATCH] Fixes the Release builds on MSVC It seems, there is a bug in the compiler or linker, that optimizes out ItemProperties destructor from the binary, along with the VTable --- libraries/lib-menus/MenuRegistry.cpp | 2 -- libraries/lib-menus/MenuRegistry.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/libraries/lib-menus/MenuRegistry.cpp b/libraries/lib-menus/MenuRegistry.cpp index 76094db1e77c..656819be62f3 100644 --- a/libraries/lib-menus/MenuRegistry.cpp +++ b/libraries/lib-menus/MenuRegistry.cpp @@ -165,8 +165,6 @@ auto MenuItems::GetOrdering() const -> Ordering { } auto MenuItems::GetProperties() const -> Properties { return Inline; } -ItemProperties::~ItemProperties() {} - CommandHandlerFinder FinderScope::sFinder = [](AudacityProject &project) -> CommandHandlerObject & { // If this default finder function is reached, then FinderScope should diff --git a/libraries/lib-menus/MenuRegistry.h b/libraries/lib-menus/MenuRegistry.h index 45e382674c7c..240c5ea20e03 100644 --- a/libraries/lib-menus/MenuRegistry.h +++ b/libraries/lib-menus/MenuRegistry.h @@ -111,7 +111,7 @@ namespace MenuRegistry { Whole, Extension, }; - virtual ~ItemProperties(); + virtual ~ItemProperties() = default; virtual Properties GetProperties() const = 0; };