[Mono-dev] Embedded API - pinning objects
omelnyk at gmail.com
Mon Jun 29 16:32:42 EDT 2009
call mono_gchandle_new() after creating the object and mono_gchandle_free()
when you don't need it.
On Mon, Jun 29, 2009 at 7:27 PM, Steve Baer <steve at mcneel.com> wrote:
> 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
> valid while I use it?
> View this message in context:
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list