Too many DynamicClassLoaders created

Description

Not sure whether this ticket belongs here or in the Clojure-proper JIRA, so feel free to close if this is an inappropriate location. clojure.main/repl creates a new DynamicClassLoader on every execution, so it looks like the stack of classloaders grows without bounds. Seems a bit similar to http://dev.clojure.org/jira/browse/NREPL-31 in that clojure.main/repl has another assumption about when clojure.main/repl will run.

See https://groups.google.com/forum/?fromgroups=#!topic/clojure/firG9zTVecU%5B1-25%5D for the original report.

Environment

None

Activity

Show:

Alex Miller June 26, 2019 at 3:52 AM

All nrepl tickets closed, now managed at https://github.com/nrepl/nrepl

Chas Emerick April 18, 2014 at 4:17 PM

Yes, this should be fixed upstream; a new DynamicClassLoader should only be set as the thread-context classloader if one is not already in place.

My first impulse upon seeing this was that this was "last straw" territory w.r.t. using clojure.main/repl (as recorded in the thread linked above), but the work necessary to stop depending upon it would be considerable (not because repl does much, but because interruptible-eval/evaluate is structured to cater to it). Some years on, and it's clear that this fundamentally a minor problem (insofar as hardly anyone has complained AFAIK), so a fix that requires e.g. Clojure 1.7.0 would be fine.

Won't Fix

Details

Assignee

Reporter

Priority

Created December 10, 2012 at 4:31 PM
Updated June 26, 2019 at 3:52 AM
Resolved June 26, 2019 at 3:52 AM