[Issue 5589][pulsar-function-go] Fix a memory leak of pulsar-function-go library (#5592)
StrEntry variable should be cleared after finish addLogTopicHandler() function regardless the log messages are appended to logger or not. If it is not cleared, it causes memory leak because StrEntry has grown indefinitely. Moreover, if the function set --log-topic, then the topic could get accumulated huge messages that cause ProducerQueueIsFull error.
Showing
想要评论请 注册 或 登录