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

Memory leak in symbol attachments #7018

Closed
scabug opened this Issue Jan 24, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@scabug
Copy link

scabug commented Jan 24, 2013

Symbol attachments leak through the $outer pointer. Proof is in this gist:

https://gist.github.com/4622507

You need to have an input file for that to work, place the one in the gist it under ./src (the directory from where you'll run the test).

The attachments leak instances of NonemptyAttachments through the outer pointer (in this case, there's a chain of 101 instances).

The problem is that NonemptyAttachments extends its own outer class (yeah, it takes a while to grok this), so every time you create a new instance, you capture the outer instance.. which happens to be another instance of NonemptyAttachments. That's a very interesting way to create linked lists, but in this case I'm pretty sure it's unintended.

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Jan 24, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7018?orig=1
Reporter: @dragos
Affected Versions: 2.10.0

@scabug

This comment has been minimized.

Copy link
Author

scabug commented Jan 26, 2013

@scabug scabug closed this Jan 27, 2013

@scabug scabug added this to the 2.10.1 milestone Apr 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment