Deleting Contained Entities

The DomainParticipant’s delete_contained_entities() operation deletes all the Publishers (including an implicitly created one, if it exists), Subscribers (including an implicitly created one, if it exists), ContentFilteredTopics, MultiTopics, and Topics that have been created by the DomainParticipant.

DDS_ReturnCode_t delete_contained_entities( ) 

Prior to deleting each contained entity, this operation recursively calls the corresponding delete_contained_entities() operation on each contained entity (if applicable). This pattern is applied recursively. Therefore, delete_contained_entities() on the DomainParticipant will end up deleting all the entities recursively contained in the DomainParticipant, that is also the DataWriter, DataReader, as well as the QueryCondition and ReadCondition objects belonging to the contained DataReader.

If delete_contained_entities() returns successfully, the application may delete the DomainParticipant knowing that it has no contained entities (see Deleting DomainParticipants).

© 2018 RTI