[Mono-list] Embedded API. Numeric Boxing and GC

jonathan at mugginsoft.com jonathan at mugginsoft.com
Wed Feb 26 17:58:09 UTC 2014


On 26 Feb 2014, at 16:15, Rodrigo Kumpera <kumpera at gmail.com> wrote:

> This code is wrong, it will fail when the object is moved since the gchandle is not pinning the target.
> 
> Avoid pinning as much as possible since it does hurt performance a lot.
> 
> The solution is to remove the monoObject field and use mono_gchandle_get_target against the GC handle.
> 
Presumably objects are pinned by default when they appear in the stack. Yes?

Jonathan


More information about the Mono-list mailing list