(Note: in the Modern C++ API, Entities are automatically destroyed, see Creating and Deleting DDS Entities)
This section applies to both implicitly and explicitly created Publishers.
DDS_ReturnCode_t delete_datawriter (DDSDataWriter *a_datawriter)
DDS_ReturnCode_t delete_publisher (DDSPublisher *p)
Note: A Publisher cannot be deleted within a Listener callback, see Restricted Operations in Listener Callbacks.
The Publisher’s delete_contained_entities() operation deletes all the DataWriters that were created by the Publisher.
DDS_ReturnCode_t delete_contained_entities ()
After this operation returns successfully, the application may delete the Publisher (see Deleting Publishers).
© 2018 RTI