I have read the documentation on 'cancel-finalization' but I am still unclear if 'cancel-finalization' will finalize the object per 'finalize' and then cancel the 'finalize' method. Or if 'cancel-finalization' will only cancel the 'finalize' method and leave clean up for the user. Thanks.
On 12/22/06, Luke Crook <luke@balooga.com> wrote:
I have read the documentation on 'cancel-finalization' but I am still unclear if 'cancel-finalization' will finalize the object per 'finalize' and then cancel the 'finalize' method. Or if 'cancel-finalization' will only cancel the 'finalize' method and leave clean up for the user.
The latter. It won't call any finalize methods. -- Luís Oliveira http://student.dei.uc.pt/~lmoliv/
Luís Oliveira <luismbo <at> gmail.com> writes:
On 12/22/06, Luke Crook <luke <at> balooga.com> wrote:
I have read the documentation on 'cancel-finalization' but I am still
if 'cancel-finalization' will finalize the object per 'finalize' and then cancel the 'finalize' method. Or if 'cancel-finalization' will only cancel
unclear the
'finalize' method and leave clean up for the user.
The latter. It won't call any finalize methods.
Thanks. I looked at the code for cancel-finalization after I posted and saw that it only performs a remhash. - Luke
The following code causes CLISP to core on Windows XP. I think perhaps there is a bug in CFFI as Lispworks does not crash with the same code. - CLISP "2.38 (2006-01-24)" - CFFI "cffi-061220.tar.gz" (defclass a-test () ()) (defmethod initialize-instance :after ((self a-test) &key) (cffi:finalize self (lambda () nil))) (dotimes (i 10000) (make-instance 'a-test))
On 12/23/06, Luke Crook <luke@balooga.com> wrote:
The following code causes CLISP to core on Windows XP. I think perhaps there is a bug in CFFI as Lispworks does not crash with the same code.
The finalizers code in CFFI is adapted from trivial-garbage. I don't remember the details but, while writing trivial-garbage I've found and reported some GC bugs in CLISP related to finalizers so I'd guess that you are seeing one of these. -- Luís Oliveira http://student.dei.uc.pt/~lmoliv/
participants (2)
-
Luke Crook
-
Luís Oliveira