[Mono-dev] Assembly.GetType() leaks with generic types

Juraj Skripsky js at hotfeet.ch
Tue Sep 4 17:45:00 EDT 2007


Hi Rodrigo,

Thanks, I applied the patch, but I'm still seeing a leak.

There must be another leak, which accounts for ~150 bytes lost after
each invocation of Assembly.GetType().

-Juraj


On Tue, 2007-09-04 at 16:00 -0300, Rodrigo Kumpera wrote:
> Hi Juraj,
> 
> I've posted a patch in the bug report.
> 
> Cheers,
> Rodrigo
> 
> 
> On 9/4/07, Juraj Skripsky <js at hotfeet.ch> wrote:
>         This is bug http://bugzilla.ximian.com/show_bug.cgi?id=82695.
>         I'm
>         posting it here because it never made it to the list
>         (mono-bugs).
>         Bugzilla doesn't like me :-(.
>         
>         
>         Test Case:
>         ==========
>         
>         using System; 
>         using System.Reflection;
>         
>         namespace TestApp {
>           public class Test<T> {}
>         
>           class Program {
>             static void Main(string[] args) {
>               Assembly assembly = typeof(Program).Assembly;
>         
>               int runs = int.Parse(args[0]);
>               for(int i = 0; i < runs; i++) {
>                 assembly.GetType (
>                   "TestApp.Test`1[[System.Object, mscorlib,
>         Version=2.0.0.0,
>         Culture=neutral, PublicKeyToken=b77a5c561934e089]]", 
>                   true
>                 );
>               }
>             }
>           }
>         }
>         
>         Run "mono test.exe 2000000" and watch the mono process grow to
>         over 300MB.
>         I'm using Mono from SVN.
>         
>         
>         - Juraj
>         
>         _______________________________________________ 
>         Mono-devel-list mailing list
>         Mono-devel-list at lists.ximian.com
>         http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 




More information about the Mono-devel-list mailing list