2014-12-26T01:19:41Z gko quit (Ping timeout: 258 seconds) 2014-12-26T01:23:07Z gko joined #ccl 2014-12-26T02:27:26Z wws joined #ccl 2014-12-26T02:29:43Z pjb` joined #ccl 2014-12-26T02:38:23Z akkad_ joined #ccl 2014-12-26T02:49:20Z pjb quit (*.net *.split) 2014-12-26T02:49:20Z billstclair quit (*.net *.split) 2014-12-26T02:49:20Z akkad quit (*.net *.split) 2014-12-26T02:49:28Z akkad_ is now known as akkad 2014-12-26T04:43:33Z pjb` is now known as pjb 2014-12-26T15:07:08Z ChanServ quit (shutting down) 2014-12-26T15:10:46Z ChanServ joined #ccl 2014-12-26T15:10:46Z weber.freenode.net has set mode +o ChanServ 2014-12-26T17:38:11Z fe[nl]ix: am I correct in saying that since ccl:terminate is a CLOS method, finalizers can only be attached to whole classes not single instances ? 2014-12-26T17:45:09Z pjb: EQL. 2014-12-26T17:45:46Z pjb: Now of course, the question is whether an EQL method on an object allows it to be garbage collected at all :-) 2014-12-26T17:46:00Z pjb: and vice versa. 2014-12-26T17:46:44Z pjb: Perhaps you would need to deal with it explicitely using weak references. 2014-12-26T17:56:32Z gbyers joined #ccl 2014-12-26T18:25:39Z rme: fe[nl]ix: termination works on a per-object basis. You have to call ccl:terminate-when-unreachable to enable termination for an object. 2014-12-26T18:26:19Z rme: If you don't like defining a method on ccl:terminate, you can pass an optional seccond argument to terminate-when-unreachable as the termination function. 2014-12-26T18:28:31Z fe[nl]ix: ok 2014-12-26T18:39:35Z fe[nl]ix: rme: can the termination function reference the object to be terminated ? 2014-12-26T18:40:00Z pjb: ie: what about circular structures? 2014-12-26T18:41:15Z fe[nl]ix: all I want is to attach a finalizer to a heap-ivector 2014-12-26T18:42:49Z rme: fe[nl]ix: Sure. There's an example in the manual that does just that. Search for ccl:terminate and you should find it easily enough. 2014-12-26T18:45:23Z fe[nl]ix: in that example the finalizer is attached to the wrapper, though 2014-12-26T18:47:09Z rme: (terminate-when-unreachable heap-ivector #'(lambda (x) (dispose-heap-ivector x))) 2014-12-26T18:48:41Z pjb: rme: that said, there should be a simple answer: are the finalizers called before collecting circular structures, or before collecting each object? 2014-12-26T18:49:24Z rme: pjb: I don't know off the top of my head. 2014-12-26T18:50:11Z pjb: I'd bet for the later, since it'd be the easiest to implement. Which means that when finalizing an object, you couldn't use the other objects it refers (if they belong to the same circle). 2014-12-26T18:54:00Z fe[nl]ix: let's take this code: http://paste.lisp.org/+33TA 2014-12-26T18:54:08Z fe[nl]ix: that does not leak any reference 2014-12-26T18:54:54Z fe[nl]ix: if, after evaluating that, I call ccl:gc, is ccl::*heap-ivectors* supposed not to contain that vector any more ? 2014-12-26T18:54:59Z fe[nl]ix: because I still see it here 2014-12-26T18:56:44Z pjb: by guess is that the finalizer will never been called. "The GC will never move this vector, and will in fact not pay any attention to it at all." says the doc. 2014-12-26T18:56:49Z pjb: s/by/my/ 2014-12-26T18:57:30Z pjb: You would have to wrap it in a normal object to call dispose-heap-ivector when this normal object is collected. 2014-12-26T18:57:31Z rme: Oh, pjb is right, of course. 2014-12-26T18:58:06Z rme: Sorry about the bad advice. 2014-12-26T18:58:18Z pjb: You didn't have the context. 2014-12-26T18:58:44Z pjb: Code always says more. 2014-12-26T18:59:09Z pjb: Has the doc been improved recently? 2014-12-26T18:59:42Z pjb: It looks like it has. 2014-12-26T19:04:11Z rme: Yes, I have been working on the documentation lately. 2014-12-26T19:04:44Z pjb: Thanks. I'll have to browse it again then :-) 2014-12-26T19:12:21Z fe[nl]ix: rme: http://trac.clozure.com/ccl/ticket/1256 2014-12-26T19:27:44Z rme: fe[nl]ix: I don't know; I'll probably mark that won't fix. If you have passed a pointer to the heap ivector's memory to some foreign code, I don't think you want the GC in charge of deciding when to free that memory. 2014-12-26T19:41:27Z fe[nl]ix: typically, the ivector is held into a wrapper, and when the wrapper is collectable foreign code is not supposed to have references to the ivector any more 2014-12-26T19:41:29Z fe[nl]ix: I'd just like not to have to manually add a finalizer everywhere 2014-12-26T20:04:57Z adlai quit (Ping timeout: 250 seconds) 2014-12-26T20:16:29Z adlai joined #ccl 2014-12-26T20:24:35Z shigoel_ joined #ccl 2014-12-26T20:28:21Z adlai quit (Ping timeout: 250 seconds) 2014-12-26T20:34:41Z adlai joined #ccl 2014-12-26T21:05:20Z shigoel_ quit (Quit: shigoel_) 2014-12-26T23:43:59Z shigoel_ joined #ccl