Closed seanyen closed 3 years ago
The topicName has shorter life cycle than the callback. Passing by pointer will cause the callback dereferencing a recycled pointer. This pull request is to make the lambda to capture the string copy instead.
topicName
callback
Good catch!
The
topicName
has shorter life cycle than thecallback
. Passing by pointer will cause the callback dereferencing a recycled pointer. This pull request is to make the lambda to capture the string copy instead.