Free item memory when closing schematic window

This fires the dtor for each item on the screen, allowing us to properly
close and remove them from the connection graph

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17961

(cherry picked from commit 9fbda137cb)
This commit is contained in:
Seth Hillbrand 2024-05-16 17:57:20 +01:00 committed by Jeff Young
parent 831d438852
commit 6ecfa65c4c
1 changed files with 1 additions and 1 deletions

View File

@ -1055,7 +1055,7 @@ void SCH_EDIT_FRAME::doCloseWindow()
// Make sure local settings are persisted
SaveProjectLocalSettings();
Schematic().RootScreen()->Clear();
Schematic().RootScreen()->Clear( true );
// all sub sheets are deleted, only the main sheet is usable
GetCurrentSheet().clear();