[IronPython] Lightweight Code Generation?

Jim Hugunin jim at ironpython.com
Sat Oct 9 19:08:29 CEST 2004

Alex Hoffman write:
> Unfortunately unloading an assembly from the primary AppDomain surely
> goes beyond any member of the CLR team's influence.  It is core to the
> architecture of the CLR - not a feature that can just be bolted on or
> included in the "next release".

Unloading assemblies is a big issue and one that I'm unlikely to change in
the very near future.  Here's a link to my boss's blog where he talks about
this issue:

I agree that there is potentially value in hosting embedded scripts in a
separate AppDomain with restricted permissions in order to increase
reliability.  I really like to ability to monitor scripts and kill them if
they use too much memory or time.  One of the many tasks on my giant todo
list is to write a hosting example that shows how separate AppDomains can be
used effectively to host a scripting solution.  Until I do that, I can't
really comment on how much of a problem this is in practice.

> As mentioned it's maybe worth a revisit given LCG and dynamic properties.

LCG is the right way to fix this problem in the near term.  Once again, I'll
send you off to one of my co-worker's blogs for a concrete example:

It should be a trivial matter to support this form of generation as an
option in IronPython that is used only on systems that support
DynamicMethod.  This would mean that 1.1 systems would have an interactive
interpreter with a memory leak, but that on 2.0 that same interactive
interpreter would stop leaking making it viable in a greater range of


More information about the Ironpython-users mailing list