[Mono-list] GC and Mono API (C)

Robert Jordan robertj at gmx.net
Thu Dec 14 05:10:25 EST 2006

Maciej Piechotka wrote:
> I write some glue between program and plugins in dlls.
> I do not know (and documentation I found was not helpful) what should I do:
> - To prevent freeing some Objects/Class (I have to keep references to
> them)

See the mono_gchandle_* () functions in object.h. The API is
similar to System.InteropServices.GCHandle.


> - To unref returned array (I don't need it any more).

You don't need to unref it. That's the job of the GC.


More information about the Mono-list mailing list