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

Ron Garret ron at flownet.com
Fri Nov 5 11:18:15 PDT 2010


Oh, right.  (Doh!)  Thanks.

On Nov 5, 2010, at 11:14 AM, Gary Byers wrote:

> (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