Thanks for the answers. I need to generate symbols to distinguish them
from strings in a parser. It seems, then, that it's better to use
symbols rather than keywords in this case.

On Jun 24, 10:52 am, "Stephen C. Gilardi" <squee...@mac.com> wrote:
> On Jun 24, 2009, at 1:30 PM, Four of Seventeen wrote:
>
>
>
> > On Jun 24, 12:22 pm, "Stephen C. Gilardi" <squee...@mac.com> wrote:
> >> Symbol objects are subject to garbage collection, but the "namespace"
> >> and "name" strings that identify them are not. Those strings are
> >> "interned" via the "intern" method on java.lang.String. Once a String
> >> is interned, there exists a single canonical String object that
> >> represents it throughout the remaining lifetime the JVM instance.
>
> > I'm not sure this is correct. I think recent Sun JVMs can GC
> > unreferenced, interned strings.
>
> Right you are.  On reading further, I see that unreferenced interned  
> Strings can be collected in Java 1.2+ because the interning mechanism  
> holds only a weak reference to them.
>
> Thanks for the correction.
>
> --Steve
>
>  smime.p7s
> 3KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to