2006/4/10, Gonzalo Paniagua Javier <[EMAIL PROTECTED]>:
> On Mon, 2006-04-10 at 13:11 +0800, GaoXianchao wrote:
> > hi all,
> >
> > I want to call a delegate from unmanaged code to managed code.
> > For some reson, I can't pass the delegate to unmanaged code every
> > time.So, I remember the delegate in the unmanaged code.
> >
> > But, the garbage collector will move the delegate object in memory,
> > how can i avoid this?
>
> Keep a copy of the delegate in a managed code (arraylist, field...).
>

Thanks a lot:)

Can this prevents the garbage collector from *moving* the delegate
object in memory?

Or this only prevents the garbage collector from *reclaiming* the
delegate object.
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to