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