Skip to content

Commit

Permalink
Removed topics_list_
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
  • Loading branch information
MiguelCompany committed Mar 9, 2021
1 parent e350125 commit dc80c49
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ typedef struct CustomParticipantInfo
eprosima::fastdds::dds::Publisher * publisher_{nullptr};
eprosima::fastdds::dds::Subscriber * subscriber_{nullptr};

// Struct to store every topic created in the local domain
// These variables needs to be
mutable std::vector<eprosima::fastdds::dds::Topic *> topics_list_;
// Protects creation and destruction of topics, readers and writers
mutable std::mutex entity_creation_mutex_;

// Flag to establish if the QoS of the participant,
Expand Down
9 changes: 0 additions & 9 deletions rmw_fastrtps_shared_cpp/src/participant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,15 +343,6 @@ rmw_fastrtps_shared_cpp::destroy_participant(CustomParticipantInfo * participant
return RMW_RET_ERROR;
}

// Topics must be deleted before delete the participant
for (auto topic : participant_info->topics_list_) {
ReturnCode_t ret = participant_info->participant_->delete_topic(topic);
if (ret != ReturnCode_t::RETCODE_OK) {
RMW_SET_ERROR_MSG("Fail in delete participant");
return rmw_fastrtps_shared_cpp::cast_error_dds_to_rmw(ret);
}
}

// Remove publisher and subcriber from participant
ReturnCode_t ret = participant_info->participant_->delete_publisher(participant_info->publisher_);
if (ret != ReturnCode_t::RETCODE_OK) {
Expand Down

0 comments on commit dc80c49

Please sign in to comment.