On Sun, Jan 25, 2009 at 11:13 AM, Christophe Grand
<christo...@cgrand.net> wrote:
> Zak Wilson a écrit :
>> know the JVM very well at all. Are there any ways around this? Are
>> techniques that generate a lot of short-lived functions just not
>> practical in Clojure?
>>
> Yes there are a way around this: permgen memory is released when the
> classloader is GCed so, if you use a transient classloader, your
> anonymous functions can be collected.

There's just this caveat; All Objects have a reference to their Class,
and all Classes have a reference to their ClassLoader, which in turn
have references to all Classes that it has loaded.

So, if an Object whose Class was loaded by loader A holds a reference
to any Object whose Class was loaded by loader B, then you will not be
able to GC loader B or any of its classes.


-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.

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