Skip to content

Commit 6eed613

Browse files
Clarify DomainParticipant deletion (#761)
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> (cherry picked from commit 88e13e8) Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
1 parent ecaecf5 commit 6eed613

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

docs/fastdds/dds_layer/domain/domainParticipant/createDomainParticipant.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Creating a DomainParticipant
99
Creation of a :ref:`dds_layer_domainParticipant` is done with the |DomainParticipantFactory::create_participant-api|
1010
member function on the
1111
:ref:`dds_layer_domainParticipantFactory` singleton, that acts as a factory for the DomainParticipant.
12+
Then, when the lifecycle of the participant finishes, every participant must be deleted with
13+
|DomainParticipantFactory::delete_participant-api|.
14+
Please refer to :ref:`dds_layer_domainParticipant_deletion` for further details on the deletion of a participant.
1215

1316
Mandatory arguments are:
1417

@@ -93,16 +96,18 @@ It is advisable to check that the returned value is a valid pointer.
9396
Deleting a DomainParticipant
9497
----------------------------
9598

96-
A DomainParticipant can be deleted with the |DomainParticipantFactory::delete_participant-api| member function on the
99+
A DomainParticipant shall be deleted with the |DomainParticipantFactory::delete_participant-api| member function on the
97100
:ref:`dds_layer_domainParticipantFactory` singleton.
98101

99-
.. note::
102+
.. important::
100103

101104
A DomainParticipant can only be deleted if all Entities belonging to the participant
102105
(Publisher, Subscriber or Topic) have already been deleted.
103106
Otherwise, the function will issue an error and the DomainParticipant will not be deleted.
104-
This can be performed by using the |DomainParticipant::delete_contained_entities-api| member function of the
105-
:ref:`dds_layer_domainParticipant`.
107+
This can be performed either by using the |DomainParticipant::delete_contained_entities-api| member function of the
108+
:ref:`dds_layer_domainParticipant` or manually deleting each entity with the corresponding *delete_* method from the
109+
DomainParticipant e.g |DomainParticipant::delete_publisher-api|, |DomainParticipant::delete_subscriber-api|,
110+
|DomainParticipant::delete_topic-api|, etc.
106111

107112
.. literalinclude:: /../code/DDSCodeTester.cpp
108113
:language: c++

0 commit comments

Comments
 (0)