Closed edrumwri closed 4 years ago
Thanks for the suggestion. This patch won't work because the "channel" passed into subscribe can be a regex, and may not correspond to the actual channel. However, I think we could achieve your goal of no heap allocation with the following changes:
std::string
channel to the Subscription type. Reserve size LCM_MAX_CHANNEL_NAME_LENGTH
during construction.subs->channel
.Hi @ashuang - would you please take a look at the updated PR?
Simply adds a member to Subscription for storing the string and passes the string back to the callback handler.
Fixes #313
This change is