EarlyReclamationOfLazyValuesInScala
SupervisedStudents.EarlyReclamationOfLazyValuesInScala
Early Reclamation Of Lazy Values In Scala
The goal of the project was to add to the Scala 3 compiler the ability to force nullify last uses of local variables, so that the GC will be able to collect it.
This issue can be illustrated by a simple snippet:
def print_forever() =
val ints = LazyList.from(0)
ints.foreach(println)
This program crashes with an OOM, because the ints
reference is still kept on the stack.
Attributes
- Authors:
-
Guillaume Carraux
- See also
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
In this article