Re: defn memory question

2009-06-26 Thread Rich Claxton
Thanks for all the interesting answers. On Jun 25, 5:23 pm, Stuart Sierra wrote: > On Jun 25, 6:25 am, RichClaxton wrote: > > > Hello I have just started learning Clojure and functional programming, > > quick question, what happens internally when I do a defn, does this > > create the byte code

Re: defn memory question

2009-06-25 Thread Stuart Sierra
On Jun 25, 6:25 am, Rich Claxton wrote: > Hello I have just started learning Clojure and functional programming, > quick question, what happens internally when I do a defn, does this > create the byte code, or a ref to the function which is stored, as it > does actually create a function object,

Re: defn memory question

2009-06-25 Thread Four of Seventeen
On Jun 25, 8:36 am, Emeka wrote: > From Steve's post > 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. Recent JVMs do collect unused interned strings

Re: defn memory question

2009-06-25 Thread Emeka
>From Steve's post 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

Re: defn memory question

2009-06-25 Thread Konrad Hinsen
On Jun 25, 2009, at 12:25, Rich Claxton wrote: > Hello I have just started learning Clojure and functional programming, > quick question, what happens internally when I do a defn, does this > create the byte code, or a ref to the function which is stored, as it > does actually create a function o

defn memory question

2009-06-25 Thread Rich Claxton
Hello I have just started learning Clojure and functional programming, quick question, what happens internally when I do a defn, does this create the byte code, or a ref to the function which is stored, as it does actually create a function object, I was just wondering about memory and GC issues.