[Mono-dev] mscorlib.dll not unloaded on windows
I haven't attached a sample but test scenario is really simple. Init mono, create child app domain, load assembly, unload domain, cleanup mono, observe how mscorlib.dll is still loaded (at least on Windows). I can tell that by looking at Process Explorer utility which shows that mscorlib.dll is still memory mapped. After every consecutive iteration one more mscorlib.dll is loaded until process runs out of virtual memory. Which is really bad for our browser plugin (Unity Web Player). Is this a known issue? I can make it go away by manually calling mono_assembly_close() on corlib but not sure if this is safe and at which point it is safe. Before mono_runtime_cleanup() or after? Thanks, Ignas -- View this message in context: http://mono.1490590.n4.nabble.com/mscorlib-dll-not-unloaded-on-windows-tp2335333p2335333.html Sent from the Mono - Dev mailing list archive at Nabble.com. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] mscorlib.dll not unloaded on windows
This is very strange since no more than a single mscorlib.dll should be loaded no matter how many AppDomians you have. Could you please send me more details about multiple mscolib.dlls: - are they loaded as DLLs or just file handles? - do they have exactly (string comparison, not considering .., links, etc.) the same full path names? Thank you. Kornel Ignas wrote: > > I haven't attached a sample but test scenario is really simple. Init mono, > create child app domain, load assembly, unload domain, cleanup mono, observe > how mscorlib.dll is still loaded (at least on Windows). I can tell that by > looking at Process Explorer utility which shows that mscorlib.dll is still > memory mapped. After every consecutive iteration one more mscorlib.dll is > loaded until process runs out of virtual memory. Which is really bad for our > browser plugin (Unity Web Player). > Is this a known issue? I can make it go away by manually calling > mono_assembly_close() on corlib but not sure if this is safe and at which > point it is safe. Before mono_runtime_cleanup() or after? > > Thanks, > Ignas ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] mscorlib.dll not unloaded on windows
While creating a sample I noticed that our code calls many cleanup functions like mono_runtime_cleanup, mono_thread_pool_cleanup, etc. But it never calls mono_jit_cleanup. Embarrassing .. but at least the problem went away :] Ignas -- View this message in context: http://mono.1490590.n4.nabble.com/mscorlib-dll-not-unloaded-on-windows-tp2335333p2336358.html Sent from the Mono - Dev mailing list archive at Nabble.com. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list