Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly cleanup completion in SafeCollector to avoid unintended memo… #3199

Merged
merged 2 commits into from Feb 24, 2022

Conversation

qwwdfsad
Copy link
Member

…ry leak that regular coroutines (e.g. unsafe flow) are not prone to

Fixes #3197

…ry leak that regular coroutines (e.g. unsafe flow) are not prone to

Fixes #3197
ALso, FieldWalker is improved to avoid "illegal reflective access"
Copy link
Contributor

@elizarov elizarov left a comment

Choose a reason for hiding this comment

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

I've made some tweaks to make the code easier to understand. Tests were tweaked to avoid the usage of unwalkable Interator. Also, FieldWalker is improved to avoid "illegal reflective access".

@qwwdfsad qwwdfsad merged commit 83ffd17 into develop Feb 24, 2022
@qwwdfsad qwwdfsad deleted the safe-collector-leak branch February 24, 2022 09:25
pablobaxter pushed a commit to pablobaxter/kotlinx.coroutines that referenced this pull request Sep 14, 2022
Kotlin#3199)

* Properly cleanup completion in SafeCollector to avoid unintended memory leak that regular coroutines (e.g. unsafe flow) are not prone to

Also, FieldWalker is improved to avoid "illegal reflective access"

Fixes Kotlin#3197

Co-authored-by: Roman Elizarov <elizarov@gmail.com>
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.

None yet

2 participants