You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once bar has been evaluated, f is no longer needed, but instances of Foo will retain a reference to it anyway (and anything it in turn has captured), potentially preventing all sorts of things from being garbage collected. This is bad, and will become particularly important once #240 is done and we have lazy parameters.
It would be nice if the following was also handled correctly:
Consider the following case:
Once bar has been evaluated, f is no longer needed, but instances of Foo will retain a reference to it anyway (and anything it in turn has captured), potentially preventing all sorts of things from being garbage collected. This is bad, and will become particularly important once #240 is done and we have lazy parameters.
It would be nice if the following was also handled correctly:
But this is somewhat less important and handling the case of only one lazy val will probably capture most of the use cases.
The text was updated successfully, but these errors were encountered: