Skip to content

Commit

Permalink
Examples fix: delete topic after endpoint (#3558) (#3564)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan López Fernández <juanlopez@eprosima.com>
(cherry picked from commit 5f2621c)

# Conflicts:
#	examples/cpp/dds/AdvancedConfigurationExample/AdvancedConfigurationSubscriber.cpp

Co-authored-by: juanlofer-eprosima <88179026+juanlofer-eprosima@users.noreply.github.com>
  • Loading branch information
mergify[bot] and juanlofer-eprosima authored Jun 6, 2023
1 parent 3fd92fb commit b06c377
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ HelloWorldSubscriber::~HelloWorldSubscriber()
{
if (participant_ != nullptr)
{
if (topic_ != nullptr)
{
participant_->delete_topic(topic_);
}
if (subscriber_ != nullptr)
{
if (reader_ != nullptr)
Expand All @@ -184,6 +180,10 @@ HelloWorldSubscriber::~HelloWorldSubscriber()
}
participant_->delete_subscriber(subscriber_);
}
if (topic_ != nullptr)
{
participant_->delete_topic(topic_);
}
DomainParticipantFactory::get_instance()->delete_participant(participant_);
}
}
Expand Down

0 comments on commit b06c377

Please sign in to comment.