Skip to content

Fix memory leak through NoDenotation.cachePrefix #11600

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

Merged
merged 2 commits into from
Mar 4, 2021

Conversation

liufengyun
Copy link
Contributor

Fix memory leak through NoDenotation.cachePrefix

We may set NoDenotation.cachePrefix in Denotation.asSeenFrom, thus
leak memory.

This memory leak is discovered by @mlachkar.

Co-authored-by: Meriam Lachkar meriam.lachkar@gmail.com

We may set `NoDenotation.cachePrefix` in `Denotation.asSeenFrom`, thus
leak memory.

This memory leak is discovered by @mlachkar.

Co-authored-by: Meriam Lachkar <meriam.lachkar@gmail.com>
@odersky
Copy link
Contributor

odersky commented Mar 4, 2021

I think it might be better to override asSeenFrom in NoDenotation

@liufengyun
Copy link
Contributor Author

I think it might be better to override asSeenFrom in NoDenotation

Indeed, that facilitates JVM optimization.

@odersky odersky merged commit 601cc5b into scala:master Mar 4, 2021
@odersky odersky deleted the fix-memory-leak branch March 4, 2021 18:36
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.

2 participants