On Thu, Jun 12, 2003 at 02:07:20PM -0700, Miles Egan wrote:
>Forgive me if this is a foolish/obvious question, but does SBCL garbage
>collect symbols when they pass out of use? I ask because I'm working on
>an xml parser and I can't decide whether I should represent xml tags as
>keywords or strings. Keywords have several advantages, but I know
>strings will get cleaned up.
Keywords are interned symbols in the KEYWORD package. So they'll not be
GCed, as they'll still be referenced. Of course, you can unintern them
afterwards, if you're sure that noone else will need them.
Or why not create an own package named XML-TAGS where you intern your
tags? At the end, unintern all those symbols and delete the package,
if you're so eager to reclaim storage.