Browse Source

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
fusion360
Seth Hillbrand 1 year ago
parent
commit
9fbda137cb
  1. 2
      eeschema/sch_edit_frame.cpp

2
eeschema/sch_edit_frame.cpp

@ -1097,7 +1097,7 @@ void SCH_EDIT_FRAME::doCloseWindow()
if( !Schematic().GetFileName().IsEmpty() && !Schematic().RootScreen()->IsEmpty() )
UpdateFileHistory( fileName );
Schematic().RootScreen()->Clear();
Schematic().RootScreen()->Clear( true );
// all sub sheets are deleted, only the main sheet is usable
GetCurrentSheet().clear();

Loading…
Cancel
Save