Skip to content

Conversation

@steve-the-edwards
Copy link
Contributor

Fixes #1338

// No other cleanup work should be done in this function, since it will only be invoked when
// this workflow is *directly* discarded by its parent (or the host).
// If you need to do something whenever this workflow is torn down, add it to the
// invokeOnCompletion handler for the Job above.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This comment was old. We now cancel anytime we stop actively rendering a node.


/**
* When we are finished with at least one node that holds on to this workflow instance,
* then we clear the cache. The reason we do that every time is that it *might* be the last
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just gonna say, this sounds like a problem for refcounting, although if this is a temporary bandaid while we prep for a bigger, more comprehensive fix, who cares.

@steve-the-edwards steve-the-edwards marked this pull request as ready for review June 10, 2025 17:09
@steve-the-edwards steve-the-edwards requested a review from a team as a code owner June 10, 2025 17:09
@steve-the-edwards steve-the-edwards force-pushed the sedwards/render-context-leak branch from 4f14d12 to cdf8890 Compare June 10, 2025 19:46
@steve-the-edwards steve-the-edwards merged commit bf75158 into main Jun 10, 2025
44 checks passed
@steve-the-edwards steve-the-edwards deleted the sedwards/render-context-leak branch June 10, 2025 20:09
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.

canonicalStatefulRenderContext is leaked after the WorkflowNode is no longer using it; also leaks lastRendering

4 participants