[Mono-devel-list] [PATCH] Improper free of return-value string pointers from unmanaged calls

Marcus mathpup at mylinuxisp.com
Fri Jun 11 00:34:33 EDT 2004

Freeing the string pointers is the appropriate behavior for .NET 

On Thursday 10 June 2004 11:29 pm, Steven Brown wrote:
> Mono improperly tries to free string pointers passed as the return value
> of unmanaged calls via P/Invoke.  This removes the code that frees that
> string pointer.
> I've attached an example of the kind of bug this fixes.  Can be tried like:
> g++ foo.cc -shared -o foo.so && mcs Test.cs && LD_LIBRARY_PATH=. mono
> Test.exe

More information about the Mono-devel-list mailing list