From f8cf34c55b588799e8df8a451611b69a4ace9513 Mon Sep 17 00:00:00 2001 From: HanifKoh <76276251+HanifKoh@users.noreply.github.com> Date: Mon, 12 Oct 2026 13:42:19 +0800 Subject: [PATCH] Reset the Fan Mover Instead of Releasing It (#16386) Clearing per-export state called unique_ptr::release(), which gives up ownership without deleting. Every export uses a new GCode, so the pointer is still empty there today and nothing leaks; reset() states the intent and would free the object if a GCode were ever reused. --- src/libslic3r/GCode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index cab75d5034..ec7ef83a3d 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -3295,7 +3295,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato m_is_role_based_fan_on.fill(false); m_role_based_fan_marker_layer.fill(-1); - m_fan_mover.release(); + m_fan_mover.reset(); m_ordering_cache.clear(); // Belt printer: initialize belt-specific writer via virtual hook.