You are here: Part 2: Core Concepts > Topics > Topics > Deleting Topics

Deleting Topics

To delete a Topic, use the DomainParticipant’s delete_topic() operation:

DDS_ReturnCode_t delete_topic (DDSTopic *  topic)

Note, however, that you cannot delete a Topic if there are any existing DataReaders or DataWriters (belonging to the same DomainParticipant) that are still using it. All DataReaders and DataWriters associated with the Topic must be deleted first.

Note: in the Modern C++ API, Entities are automatically destroyed.

© 2016 RTI