iam not used to COM but i needed to create a .NET component using C# to be compiled as a dll to be used in another program suite, so i did it as a COM object (registering for COM interop, and the assembly visible to COM etc..)
Assuming that i have my interface class:
using System.Runtime.InteropServices;
namespace Test
{
public interface IFoo
{
void method1(parameter1);
void method2 (parameter2);
}
[ComVisible(true),ClassInterface(ClassInterfaceType.None)]
public class myname : IFoo
{
FooClass class;
public myname()//Constructor
{
}
public void method1(parameter1)
{
class = new FooClass();
class.Method1(parameter1);
}
}
}
After this i compile it and register the dll on another computer using regasm. I run it, but this application consume lots of memory and never frees itself, does anyone knows a way to release it/destroy it?
Question is how to release memry usage? thanks in advance