- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Actions with the list
Sun, 2010-10-24, 13:36
Hi. Explain me anybody please one the point. For example, i create and
initialize immutable of List[T] and something doing.
var l1: List[T] = (1 to 5).toList
Further doing reassign l1 of variable the value:
var l1: Int=>Int = x=>x
What is it should happen with allocated memory for l1? GC must free the
memory allocated for l1. In sum what become with list (1 to 5).toList?
Thans.
--
Alexandr Litvinov
skype: free.dvig
twitter: @dvig
I'm sorry but that doesn't make any sense to me.
Viktor Klang
Code Connoisseur
@viktorklang
On Oct 24, 2010, at 14:36, Litvinov Alexandr wrote:
> Hi. Explain me anybody please one the point. For example, i create and initialize immutable of List[T] and something doing.
>
> var l1: List[T] = (1 to 5).toList
> Further doing reassign l1 of variable the value:
>
> var l1: Int=>Int = x=>x
>
> What is it should happen with allocated memory for l1? GC must free the memory allocated for l1. In sum what become with list (1 to 5).toList?
>
> Thans.
> --
>
> Alexandr Litvinov
> skype: free.dvig
> twitter: @dvig
>