fix(demos): the machining demos dispose their LocalProjectService before LocalApp.AppEnd -- DemoUseMachiningProject, DemoBuildMachiningProject and DemoBuildGeomOnlyMachiningProject ended with machiningProject.Dispose(); LocalApp.AppEnd();, so the service was never disposed: MachiningProject.Dispose releases only the project's TimeMapping, while the service's machining runner keeps its threads, its native pipeline, the strip and the workpiece tree, everything AppEnd's documentation asks to be gone before it ends the native core. Each demo now disposes the service right after the project, one line with a comment saying why; not a using declaration, which would dispose it after AppEnd.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 20:07:15 +08:00
co-authored by Claude Opus 5.5
parent a03aa1c1ff
commit bc67d8469b
3 changed files with 6 additions and 0 deletions
+2
View File
@@ -85,6 +85,8 @@ public static class DemoUseMachiningProject
#region CleanupResources
Console.WriteLine($"Close Project: {projectPath}");
machiningProject.Dispose();
//the service holds the play threads, the strip and the cut workpiece tree: dispose it before AppEnd
localProjectService.Dispose();
LocalApp.AppEnd();