On Wed, Feb 26, 2014 at 12:58 PM, [email protected] < [email protected]> wrote:
> On 26 Feb 2014, at 16:15, Rodrigo Kumpera <[email protected]> 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? > Only in the C stack, but as soon as your (void)box:(long long)value method finishes executing, no stack references will be left.
_______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
