[gambit-list] will objects around immediate objects won't deallocate

Christian christian at pflanze.mine.nu
Sun Oct 29 13:39:00 EST 2006


Hello

I've noticed that calling make-will on some immediate object will not
give an error (which is probably a good thing), but then never get
deallocated.

  > (make-will 1234 (lambda (v) (display (list "will:" v "\n"))))
  #<will #2>
  > (##gc)
  > (##gc)
  > #2
  #<will #2>

Not sure whether that's a bug and what the right thing would be (I've
not run into this in real code). Wills around bignums work as
expected, so if people are using that on numbers without checking
whether the number is heap allocated, they will get a leak in the
fixnum case. Maybe the best solution is to return #f when calling
make-will on immediate objects.

Cheers
Christian.




More information about the Gambit-list mailing list