Releasing ActiveX in .Net application

TeeChart for ActiveX, COM and ASP
Post Reply
Franz Thomsen
Newbie
Newbie
Posts: 1
Joined: Tue Mar 11, 2008 12:00 am

Releasing ActiveX in .Net application

Post by Franz Thomsen » Tue Oct 07, 2008 7:58 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Oct 07, 2008 10:56 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply