Re: Garbage collector - ccl:terminate (memory stuff)
Ron Garret <[email protected]> Sat, 4 May 2024 08:37:52 -0700
| Newsgroups | gmane.lisp.openmcl.devel |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_6D9E48E4-DD3B-4A4A-A499-B60B26BEF043 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 4, 2024, at 8:27 AM, Gr=C3=A9gory Vanuxem <[email protected]> = wrote: >=20 > In CL I only keep a reference to this Julia object in a very small CL > class instance that contains the Julia type and the Julia hashtable > reference key. >=20 > After, the CCL GC does its job, but **my problem here**, see this > discussion before, CCL:terminate is never called. My guess is you need to use a weak hash table: https://ccl.clozure.com/docs/ccl.html#weak-references = <https://ccl.clozure.com/docs/ccl.html#weak-references> rg --Apple-Mail=_6D9E48E4-DD3B-4A4A-A499-B60B26BEF043 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><br = class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div = class=3D"">On May 4, 2024, at 8:27 AM, Gr=C3=A9gory Vanuxem <<a = href=3D"mailto:[email protected]" class=3D"">[email protected]</a>>= wrote:</div><div class=3D""><div class=3D""><br class=3D"">In CL I only = keep a reference to this Julia object in a very small CL<br = class=3D"">class instance that contains the Julia type and the Julia = hashtable<br class=3D"">reference key.<br class=3D""><br class=3D"">After,= the CCL GC does its job, but **my problem here**, see this<br = class=3D"">discussion before, CCL:terminate is never = called.</div></div></blockquote><div><br class=3D""></div><div>My guess = is you need to use a weak hash table:</div><div><br = class=3D""></div><div><a = href=3D"https://ccl.clozure.com/docs/ccl.html#weak-references" = class=3D"">https://ccl.clozure.com/docs/ccl.html#weak-references</a></div>= <div><br class=3D""></div><div>rg</div><div><br = class=3D""></div></div></body></html>= --Apple-Mail=_6D9E48E4-DD3B-4A4A-A499-B60B26BEF043--