[Mono-dev] when to call mono_thread_attach

Ng, Victor Victor.Ng at CIBC.ca
Fri Apr 15 11:19:53 EDT 2011

>> Also, how do I know what objects I have to call mono_free on?  I can't 
>> seem to find a good reference on that topic.

>This is usually well-documented.

Where can I find this documentation?  So far, I only now about mono_string_new from the embedding webpage.

I couldn't find any code in the samples directory that invoked mono_free, and the header file mono/metadata/object.h doesn't seem to indicate that mono_free needs to be called.

>> Are there also objects where I have to 'pin' them into memory for the 
>> Mono GC?
>Of course. You have to pin *all* MonoObjects that you're going to store into places other >than the stack.

thanks - this seems to have cleared up my problem.

More information about the Mono-devel-list mailing list