
6 Apr
2014
6 Apr
'14
3:44 a.m.
On 4/5/2014 10:55 AM, Bob Ippolito wrote:
Now, how might I do something like that but "forget" previous values to free up memory?
Garbage Collection does that for you. If all the references are gone, the memory can be freed. If you have a specific use in mind I can show you what that looks like.
Say, zz = abs <$> numerator <$> iterate (\x->x^2-7%4) 0 and at some point I print $ zz!!30 How does the GC know that I'll never refer to zz!!n again where n < 30 ?