[Mono-dev] Image mempool grows with use of mono_runtime_invoke on value types

2008-11-03 Thread Ewen Cheslack-Postava
Hi all, I'm embedding mono in my application. We happen to call methods from unmanaged code on value types pretty regularly and we noticed memory usage getting out of hand after a few days running continuously. I've tracked the problem down to the image's mempool which is growing continuously.

Re: [Mono-dev] Embedding Mono + SWIG string return values leads to bad free

2008-04-23 Thread Ewen Cheslack-Postava
] wrote: 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

[Mono-dev] Embedding Mono + SWIG string return values leads to bad free

2008-04-21 Thread Ewen Cheslack-Postava
Hi, I'm embedding Mono and using SWIG to wrap a few simple C++ objects. They use PInvoke to wrap these objects and for string/char* return values they use a C# delegate in order to obtain a string owned by the GC so it can safely be returned. They use a simple C# static method where the string