Skip to content

Conversation

@rasapala
Copy link
Collaborator

🛠 Summary

Model reload mem leak fix.

🧪 Checklist

  • Unit tests added.
  • The documentation updated.
  • Change follows security best practices.
    ``

[this, actualWorkloadCallback = std::move(actualWorkloadCallback)](drogon::ResponseStreamPtr stream) {
this->stream = std::move(stream);
this->pool.Schedule([actualWorkloadCallback = std::move(actualWorkloadCallback)] {
this->pool.Schedule([&actualWorkloadCallback] {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what ensures us that the lifetime of actualWorkloadCallback will be greater than Scheduler task lifetime?

[this, actualWorkloadCallback = std::move(actualWorkloadCallback)](drogon::ResponseStreamPtr stream) {
this->stream = std::move(stream);
this->pool.Schedule([actualWorkloadCallback = std::move(actualWorkloadCallback)] {
this->pool.Schedule([&actualWorkloadCallback] {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants