I have created dll in C# 3.5 which does some memory intensive matrix calculations where matrices get created and disposed a lot. Everything works fine if dll is called from .Net app but if it is called from C++ created app memory usage just climbs until the function that uses matrices is done. I guess there is a problem with a automatic garbage collection.
I have created dll in C# 3.5 which does some memory intensive matrix calculations
Share
Most probably you are not ‘Release’ing the references to the .Net object wrappers from your unmanaged app. The GC cannot collect that memory unless all references (including external ones) are released.