[resending, email server not working]
On Thu, 2008-04-24 at 18:33 -0400, Miguel de Icaza wrote:
> Hello,
>
> > The returned string is passed back to the SWIG C# class and used
> > (successfully) and then later the GC tries to collect it and fails.
> > The C# delegate is just something like
>
> The GC does not collect strings returned from P/Invoke, but it will free
> return values.
>
> If you are returning strings that are now malloc()ed (and ownership is
> transferred to the caller), you may want to change the P/Invoke
> signature to return an IntPtr, and then use Marshal.PtrToStringAuto
>
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list