Skip to content

LazyAnnotation: avoid unnecessary memory leaks #8620

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 27, 2020

Conversation

smarter
Copy link
Member

@smarter smarter commented Mar 26, 2020

When a deferred annotation has been completed, let the completer closure
be garbage-collected to avoid potential leaks.

@smarter smarter force-pushed the annot-leak branch 2 times, most recently from c88e224 to e185d76 Compare March 26, 2020 21:09
smarter added 2 commits March 26, 2020 22:14
When a deferred annotation has been completed, let the completer closure
be garbage-collected to avoid potential leaks.
And address the TODO comment by adding an apply method that takes a
`Context ?=> Tree`.

Also add `Annotation#isEvaluating`, previously
`LazyBodyAnnotation#isEvaluated` was also returning true when evaluation
was started but not finished which was confusing.
@odersky odersky merged commit 64d6536 into scala:master Mar 27, 2020
@odersky odersky deleted the annot-leak branch March 27, 2020 18:41
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