Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Memory leak in symbol attachments #7018
Symbol attachments leak through the $outer pointer. Proof is in this gist:
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
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.
Imported From: https://issues.scala-lang.org/browse/SI-7018?orig=1