[Openmcl-devel] ccl:terminate doesn't seem to be working

Gary Byers gb at clozure.com
Fri Nov 5 11:14:59 PDT 2010


(let* ((the-foo (make-foo)))
   (CCL:TERMINATE-WHEN-UNREACHABLE THE-FOO)
   the-foo)


On Fri, 5 Nov 2010, Ron Garret wrote:

> This leaks:
>
> (defclass foo () ((p :initform (#_malloc 4096))))
>
> (defmethod ccl:terminate ((f foo)) (#_free (slot-value f 'p)))
>
> (loop (make-foo))
>
> Even if you force a GC:
>
> (loop (dotimes (i 100000) (make-foo)) (gc))
>
> it still leaks.  But it seems like it ought not to.  Is this a bug, or am I doing something wrong?
>
> rg
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list