[Mono-dev] Embedded API - pinning objects

Steve Baer steve at mcneel.com
Mon Jun 29 12:27:51 EDT 2009

I've just started playing with embedding mono in a C++ app so I'll probably
have plenty more questions.

I'm a little confused about the "lifetime" of a MonoObject*. Say I create a
MonoObject with the following code

MonoObject* mobj = mono_object_new(domain, mclass);

Is mobj "pinned" in memory and if so what can I call to release the object?
Do I need to immediately call mono_gchandle_new on mobj so the pointer stays
valid while I use it?

View this message in context: http://www.nabble.com/Embedded-API---pinning-objects-tp24257413p24257413.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

More information about the Mono-devel-list mailing list