I did some memory profiling on a Clojure Application.
I wondered why 361000 clojure.lang.Symbols exist.
So I did some object browsing on the memory dump and found duplicate
symbols. After checking the source:
static public Symbol intern(String nsname){
int i = nsname.indexOf('/');
if(i == -1 || nsname.equals("/"))
return new Symbol(null, nsname.intern());
else
return new Symbol(nsname.substring(0, i).intern(),
nsname.substring(i + 1).intern());
}
I realized that interning of a symbol always returns a "new" Symbol object.
If a symbol X is interned twice, shouldn't the second Symbol.intern(X)
return the previous interned symbol object?
Jürgen
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.