hunyadi-dev commented on a change in pull request #1022:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1022#discussion_r589249439
##########
File path: extensions/standard-processors/processors/GetTCP.cpp
##########
@@ -285,21 +285,17 @@ void GetTCP::onTrigger(const
std::shared_ptr<core::ProcessContext> &context, con
} else {
logger_->log_error("Could not create socket for %s", endpoint);
}
- auto* future = new std::future<int>();
std::unique_ptr<utils::AfterExecute<int>> after_execute =
std::unique_ptr<utils::AfterExecute<int>>(new SocketAfterExecute(running_,
endpoint, &live_clients_, &mutex_));
utils::Worker<int> functor(f_ex, "workers", std::move(after_execute));
- if (client_thread_pool_.execute(std::move(functor), *future)) {
- live_clients_[endpoint] = future;
- }
+ auto* future = new
std::future<int>(client_thread_pool_.execute(std::move(functor)));
Review comment:
Who cleans up these futures allocated with `new`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]