Previously active Routes were retained until the end of Session d'tor and not dropped during Session::destroy.
While most resources were explicitly cleaned up via DropReferences, Processor UIs are kept around until the actual destructor runs. Likewise some controllable are kept around while the GraphNode (Route) owning it is not released.
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 2b602f7398..52b2ad3fe9 100644
@@ -690,6 +690,8 @@ Session::destroy ()
/* drop GraphNode references */
+ _current_route_graph = GraphEdges ();
38a40d7c06 Session drop graph-nodes before ~Session
libs/ardour/session.cc | 2 ++
1 file changed, 2 insertions(+)