Hi, Ewen Cheslack-Postava wrote: > This seems to work well on Linux and Mac OS X, but on Windows it > causes an exception when the GC tries to free that same memory. I've > verified that I do in fact get a new copy of the string out at a > different address from the original. It looks like maybe the string > is just being double freed. The specific error I get (only in the > Visual Studio debugger) is: > > HEAP[x.exe]: Invalid Address specified to RtlFreeHeap( 01E00000, 00166C78 )
On Windows, the char* returned by the C# method must be freed with GlobalFree (). You're probable using free () which is expecting that the memory was allocated from another heap. This is for compatibility with MS.NET. Robert _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list