[Mono-devel-list] Re: Heads up: marshalling changes

Zoltan Varga vargaz at gmail.com
Tue Sep 7 07:06:22 EDT 2004


                                         Hi,

  The changes were the following:

- Managed code now needs to keep a reference to delegates passed to unmanaged
  code, otherwise they will be freed. For more info an possible solutions, see
  this:

http://blogs.msdn.com/adam_nathan/archive/2003/06/01/56693.aspx

- Strings inside structures/arrays passed to managed code are now freed after
  the call.

- Memory returned by unmanaged code in some form (return value, changed 
  byref parameter etc) is now freed after it has been converted to managed data.

Other than this, things should work the same, but there could be bugs in the
new code so beware.

                    Zoltan


On Tue, 7 Sep 2004 01:12:54 +0200, Zoltan Varga <vargaz at gmail.com> wrote:
>                                             Hi,
> 
>   I checked in some major changes to mono's marshalling infrastructure primary
> to fix some memory leaks with the old code. There is a high probability that
> some things were broken in the process. So if you have some pinvoke code which
> used to work but doesn't work now, drop a mail to the list, and I will
> look into it.
> 
>                                                          Zoltan
>



More information about the Mono-devel-list mailing list