Delete the readers and writers (which closes them automatically) to prevent memory leaks.
This commit is contained in:
@@ -274,10 +274,10 @@ bool
|
|||||||
SG_DDS::close()
|
SG_DDS::close()
|
||||||
{
|
{
|
||||||
for (auto it : readers)
|
for (auto it : readers)
|
||||||
it->close();
|
delete it;
|
||||||
|
|
||||||
for (auto it : writers)
|
for (auto it : writers)
|
||||||
it->close();
|
delete it;
|
||||||
|
|
||||||
readers.clear();
|
readers.clear();
|
||||||
writers.clear();
|
writers.clear();
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Destructor */
|
/** Destructor */
|
||||||
~SG_DDS_Topic();
|
virtual ~SG_DDS_Topic();
|
||||||
|
|
||||||
// Set the paramaters which weren't available at creation time and use
|
// Set the paramaters which weren't available at creation time and use
|
||||||
// a custom topic name.
|
// a custom topic name.
|
||||||
|
|||||||
Reference in New Issue
Block a user