[Mono-devel-list] Assembly.LoadFrom leak
Marek Safar
marek.safar at seznam.cz
Mon Jun 6 12:03:29 EDT 2005
Hello,
>> 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.
I am testing this under cygwin (WXP)
>
> 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.
I don't like idea to create AppDomain for every assembly load. Once I
don't need this assembly I set it to null.
It should be enough.
>> It looks like is leaking somewhere. Any idea where ?
>
>
> You are right, this is a leak but this leak is caused by you.:)
Not sure, I am running same test under Microsoft Runtime and it works fine.
Marek
More information about the Mono-devel-list
mailing list