Re: help with weak references

[email protected] Mon, 4 Jan 2016 18:41:50 -0800 (PST)
Newsgroups gmane.comp.lang.scala
Message-ID <[email protected]>

Thanks for nailing this Jasper-M. 

A class (versus case class) is necessary, and if one really wanted to bind 
variables one could use a var as in:

var x = wr.get.get
x = nullSystem.gc()
println(wr.get.get) // <---- prints None.

However, the above defeats having a REPL. If one were manipulating 
'big-data', then the growing lexical scope from the interactive session 
would keep holding onto inaccessible values. 

Is this a bug?


On Monday, January 4, 2016 at 10:26:17 AM UTC-5, Jasper-M wrote:

To illustrate my comments.
>
> scala>  import scala.ref.WeakReference
> import scala.ref.WeakReference
>
>

-- 
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.