Skip to content

Commit 6f885ba

Browse files
committed
Refs #23716: Delete DynamicData after processing sample
Signed-off-by: Carlosespicur <[email protected]>
1 parent 19d69a6 commit 6f885ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/cpp/subscriber/UserDataReaderListener.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ void UserDataReaderListener::on_data_available(
5656
// Type is required to deserialize the data
5757
if (!type)
5858
{
59+
EPROSIMA_LOG_WARNING(USER_DATA_READER_LISTENER, "Unable to process user data. Topic type is unknown.");
5960
return;
6061
}
6162

@@ -74,6 +75,8 @@ void UserDataReaderListener::on_data_available(
7475
}
7576
}
7677
}
78+
79+
DynamicDataFactory::get_instance()->delete_data(data);
7780
}
7881

7982
std::string UserDataReaderListener::serialize_user_data(

0 commit comments

Comments
 (0)