Skip to content

Commit 91b3cb3

Browse files
committed
FIX: remove duplicate CMakeLists sources and leak timer_sync_printer
F-010: Scrollbar.cpp and ScrolledWindow.cpp were listed twice in SLIC3R_GUI_SOURCES (lines 39/41 and 73/75), violating the ODR and inflating incremental build time for those translation units. F-006: Sidebar::priv::~priv() never deleted timer_sync_printer, which is heap-allocated at member initialisation (= new wxTimer()). Add Stop() + delete in the destructor to plug the leak on application exit. Ref: #10289
1 parent 4dac1d2 commit 91b3cb3

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/slic3r/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ set(SLIC3R_GUI_SOURCES
7070
GUI/Widgets/FilamentLoad.hpp
7171
GUI/Widgets/FanControl.cpp
7272
GUI/Widgets/FanControl.hpp
73-
GUI/Widgets/Scrollbar.cpp
74-
GUI/Widgets/Scrollbar.hpp
75-
GUI/Widgets/ScrolledWindow.cpp
76-
GUI/Widgets/ScrolledWindow.hpp
7773
GUI/Widgets/StepCtrl.cpp
7874
GUI/Widgets/StepCtrl.hpp
7975
GUI/Widgets/ProgressBar.cpp

src/slic3r/GUI/Plater.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,12 @@ void Sidebar::priv::show_fila_switch_msg(bool ready)
996996

997997
Sidebar::priv::~priv()
998998
{
999+
// Stop and delete the printer-sync timer to prevent resource leak
1000+
if (timer_sync_printer) {
1001+
timer_sync_printer->Stop();
1002+
delete timer_sync_printer;
1003+
timer_sync_printer = nullptr;
1004+
}
9991005
// BBS
10001006
//delete object_manipulation;
10011007
delete object_settings;

0 commit comments

Comments
 (0)