It's an issue of when the object referenced by 'a' can be garbage
collected.

Rich is able to do some magic in the bytecode whereby the 'a'
reference is set to null prior to the effective call to fn2 (and still
pass the object), thus the object can be garbage collected whenever
fn2 is done with it (or even deeper down into the call chain).

Without fine-grained clearing, the visible args and locals of every
function in the call chain could not be garbage collected until the
entire stack returned.  That could be a problem in a language which
uses recursion, persistent data structures, and immutable locals.




On Jun 22, 8:14 pm, ".Bill Smith" <william.m.sm...@gmail.com> wrote:
> I do not understand the question.
>
> On Jun 22, 5:46 am, ann <tek...@gmail.com> wrote:
>
>
>
> > (defn fn1 [a] (fn2 a) )
>
> > When is a cleared, before call to fn2 or after?

-- 
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