Skip to content

Commit

Permalink
Fixing recursive cleanup in hier
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Clark committed Jan 29, 2025
1 parent bdceae9 commit 0ab802a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
5 changes: 0 additions & 5 deletions gnuradio-runtime/include/gnuradio/flowgraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,6 @@ class GR_RUNTIME_API flowgraph
*/
void clear();

/*!
* \brief Clear existing flowgraph msg edges
*/
void clear_msg();

/*!
* \brief Get vector of edges
*/
Expand Down
7 changes: 1 addition & 6 deletions gnuradio-runtime/lib/flowgraph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,8 @@ void flowgraph::clear()
{
// Boost shared pointers will deallocate as needed
d_blocks.clear();
d_edges.clear();
}

void flowgraph::clear_msg()
{
// Boost shared pointers will deallocate as needed
d_msg_edges.clear();
d_edges.clear();
}

void flowgraph::check_valid_port(gr::io_signature::sptr sig, int port)
Expand Down
3 changes: 1 addition & 2 deletions gnuradio-runtime/lib/hier_block2_detail.cc
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ void hier_block2_detail::recursive_disconnect_all(hier_block2* caller)
d_debug_logger->debug("Disconnect hier_block2 recursive...");
for (auto& path : d_fg->partition()) {
for (auto block_pointer : path) {
auto hier_ptr = std::dynamic_pointer_cast<hier_block2>((*block_pointer));
auto hier_ptr = std::dynamic_pointer_cast<hier_block2>((block_pointer));
if(hier_ptr) hier_ptr->disconnect_all();
}
}
Expand All @@ -516,7 +516,6 @@ void hier_block2_detail::disconnect_all()
recursive_disconnect_all(this->d_owner);
reset_hier_blocks_parent();
d_fg->clear();
d_fg->clear_msg();
d_blocks.clear();

int max_inputs = d_owner->input_signature()->max_streams();
Expand Down

0 comments on commit 0ab802a

Please sign in to comment.