You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run publisher and/or subscriber with option -c 2 using valgrind. A memory leak is reported.
Expected behavior
There should not be any memory leak.
Suggested solutions
The problem is that in the publisher
DataWriterListener *writer_listener = new DataWriterListener();
is never released. And in the subscriber
ParticipantListener *participant_listener = new ParticipantListener();
ReaderListener *reader_listener = new ReaderListener();
SubscriberListener *subscriber_listener = new SubscriberListener();
are never released.
Also for consistency, the sub application checks for null pointer after creating the listeners, but the pub application does not check for this. After creating the DW listener we should add the following:
Note : in the subscriber if the DR listener can not be created the application will terminate gracefully with a memory leak because the participant and the subscriber listeners are not deleted.
The text was updated successfully, but these errors were encountered:
System information
What is the current behavior?
Memory leak
Steps to reproduce the issue
Compile example examples/connext_dds/listeners
Run publisher and/or subscriber with option -c 2 using valgrind. A memory leak is reported.
Expected behavior
There should not be any memory leak.
Suggested solutions
The problem is that in the publisher
DataWriterListener *writer_listener = new DataWriterListener();
is never released. And in the subscriber
are never released.
Also for consistency, the sub application checks for null pointer after creating the listeners, but the pub application does not check for this. After creating the DW listener we should add the following:
Note : in the subscriber if the DR listener can not be created the application will terminate gracefully with a memory leak because the participant and the subscriber listeners are not deleted.
The text was updated successfully, but these errors were encountered: