Updated: April 19, 2023 |
Delete a topic
#include <pips/publication.h>
int pips_delete_topic(pips_topic_t **topic)
This function safely deletes the specified topic, which is passed by reference, ensuring that the instance is properly cleaned up in the middleware. This function should be used instead of the standard free() system call to ensure that all system resources are properly cleaned up.
Any publications created for the topic become invalidated and their behavior undefined when the topic is deleted. This means all local publications for the topic must be deleted before the topic itself is deleted.