[Mono-list] lifetime of MonoMethod in mono embedding

ptr2009 ptrajkumar at gmail.com
Wed Nov 18 14:23:59 EST 2009


hey all

   It seems like when using mono_object_new in an embedded application you
are supposed to use mono_gchandle_new to store a handle to the object so
that it is not garbage collected when you reference it again. 

  1) what is appropriate value of pinned gboolean to be passed to
mono_gchandle_new . Does it always need to be passed as TRUE ?

  2) I also have a call a method on this object handle periodically.  Is it
safe to store a pointer to MonoMethod that is returned from
mono_class_get_method_from_name in your native code. Is MonoMethod* pointer
effected by the garbage collector.  Is there an equivalent of
mono_gchandle_new for methods ?

Thanks in advance
Raj
-- 
View this message in context: http://old.nabble.com/lifetime-of-MonoMethod-in-mono-embedding-tp26414091p26414091.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list