[Mono-devel-list] Assembly.LoadFrom leak

Kornél Pál kornelpal at hotmail.com
Mon Jun 6 11:09:47 EDT 2005


> Having troubles with calling Assembly.LoadFrom after around 500th call
> (every call with different assembly) I'm getting
> 'System.IO.FileNotFoundException' exception
> for every other call.

It may be because your operating system reached it's open file (or file
handle) limit. You did not tell what software environemt are you using so I
cannot tell more, but usually this limit can be increased by changing the
configuration of your OS.

Loading so much assembly may need memory as well but I think it should cause
other exceptions.

If you do not need these assemblies simultaneously you should unload them.
This can be done by creating a new AppDomain and if you unload it assemblies
used only by this AppDomain will be unloaded as well.

> It looks like is leaking somewhere. Any idea where ?

You are right, this is a leak but this leak is caused by you.:)


More information about the Mono-devel-list mailing list