[Mono-list] DynamicMethod
Robert Jordan
robertj at gmx.net
Thu Jun 7 15:44:26 EDT 2007
Hi Rodrigo,
Rodrigo B. de Oliveira wrote:
> On 6/7/07, Chris Seaton <chris at chrisseaton.com> wrote:
>> Yes, they should be collected by the garbage collector. I think the
>> MSN docs explicitly say so.
>
> I know they should be. My question is if mono does GC them currently.
It doesn't. Have a look at
reflection.c:mono_reflection_create_dynamic_method ().
The function is calling reflection_methodbuilder_to_mono_method (),
which it turn uses malloc, because a dynamic method doesn't have an
image to allocate the memory from.
I tried to introduce a GC controlled MonoMemPool per DynamicMethod,
but the JIT crashed right after mempool's collection.
Robert
More information about the Mono-list
mailing list