Skip to content

Too many class parameters get stored in fields #2869

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

Closed
odersky opened this issue Jul 14, 2017 · 1 comment
Closed

Too many class parameters get stored in fields #2869

odersky opened this issue Jul 14, 2017 · 1 comment

Comments

@odersky
Copy link
Contributor

odersky commented Jul 14, 2017

In this simple class

class MT(sf: MT => String) {
   val s = sf(this)
 }

the parameter sf is retained in the class, even though it is only used
in the initialization of s. This creates memory leaks. Observed while
memory-profiling the IDE.

@smarter
Copy link
Member

smarter commented Jul 14, 2017

Related: #1692

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

No branches or pull requests

2 participants