parent
2c00540ad6
commit
b4cc28a5b6
|
@ -355,7 +355,7 @@ bool CONNECTION_GRAPH::m_allowRealTime = true;
|
||||||
|
|
||||||
void CONNECTION_GRAPH::Reset()
|
void CONNECTION_GRAPH::Reset()
|
||||||
{
|
{
|
||||||
for( auto subgraph : m_subgraphs )
|
for( auto& subgraph : m_subgraphs )
|
||||||
delete subgraph;
|
delete subgraph;
|
||||||
|
|
||||||
m_items.clear();
|
m_items.clear();
|
||||||
|
@ -1415,10 +1415,20 @@ void CONNECTION_GRAPH::buildConnectionGraph()
|
||||||
m_net_code_to_subgraphs_map[ code ].push_back( subgraph );
|
m_net_code_to_subgraphs_map[ code ].push_back( subgraph );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clean up and deallocate stale subgraphs
|
||||||
m_subgraphs.erase( std::remove_if( m_subgraphs.begin(), m_subgraphs.end(),
|
m_subgraphs.erase( std::remove_if( m_subgraphs.begin(), m_subgraphs.end(),
|
||||||
[&] ( const CONNECTION_SUBGRAPH* sg ) {
|
[&]( const CONNECTION_SUBGRAPH* sg ) {
|
||||||
return sg->m_absorbed;
|
if( sg->m_absorbed )
|
||||||
} ), m_subgraphs.end() );
|
{
|
||||||
|
delete sg;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} ),
|
||||||
|
m_subgraphs.end() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,9 @@ public:
|
||||||
m_no_connect( nullptr ), m_bus_entry( nullptr ), m_driver( nullptr ), m_frame( aFrame ),
|
m_no_connect( nullptr ), m_bus_entry( nullptr ), m_driver( nullptr ), m_frame( aFrame ),
|
||||||
m_driver_connection( nullptr ), m_hier_parent( nullptr )
|
m_driver_connection( nullptr ), m_hier_parent( nullptr )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
~CONNECTION_SUBGRAPH() = default;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines which potential driver should drive the subgraph.
|
* Determines which potential driver should drive the subgraph.
|
||||||
*
|
*
|
||||||
|
@ -206,6 +209,11 @@ public:
|
||||||
m_frame( aFrame )
|
m_frame( aFrame )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
~CONNECTION_GRAPH()
|
||||||
|
{
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue