#79: Memory leak ?
----------------------+-----------------------------------------------------
  Reporter:  guest    |       Owner:  nobody
      Type:  defect   |      Status:  closed
  Priority:  major    |   Milestone:        
 Component:  hugs     |     Version:  200609
Resolution:  invalid  |    Keywords:        
----------------------+-----------------------------------------------------
Changes (by ross):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 This is all expected behaviour.

 In the first case, computing the reverse requires building the whole list,
 and it doesn't fit.

 It the second, if you say `print [1..1000000]`, the front part of the list
 is evaluated  and printed, but since there are no more references to it,
 it can be reclaimed by the garbage collector.  But when you have a
 definition `tab = [1..1000000]`, printing evaluates the whole list, but it
 can't be reclaimed, because there is still a reference to it, namely
 `tab`.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/79#comment:1>
Hugs <http://www.haskell.org/hugs/>
Hugs 98, an interpreter for Haskell
_______________________________________________
Hugs-Bugs mailing list
Hugs-Bugs@haskell.org
http://www.haskell.org/mailman/listinfo/hugs-bugs

Reply via email to