Please sign in to comment.
Fix a memory leak in stack_context.
The old_contexts reference in StackContexts could maintain a chain of old irrelevant contexts, so clear it once it's no longer needed. This was mainly a problem in gen.engine, where additional contexts would accumulate in memory (but not on the stack) for each asynchronous operation. Also clear the deactivate_stack_context in gen.Runner to allow the StackContext to be garbage-collected sooner.
- Loading branch information...
Showing with 24 additions and 0 deletions.