Page 1 of 1

Releasing ActiveX in .Net application

Posted: Tue Oct 07, 2008 7:58 am
by 15048582
Hi

I'm using the TeeChart8.ocs in a .net application but have quite some difficulties in releasing the object again:

When doing:

TChart chart = new TChartClass();
System.Runtime.InteropServices.Marshal.ReleaseComObject(chart);
chart = null;

procexp.exe still reports that the application is using it. What can I do to release the com object?

Best Regards
Franz Thomsen

Posted: Tue Oct 07, 2008 10:56 am
by narcis
Hi Franz,

You could try using this:

http://msdn.microsoft.com/en-us/library/xe0c2357.aspx

But you should be very carefull using this method. You may need to read up on how .NET Framework handles memory.