Bizarre Behaviour Console versus GUI App wrt ActiveX interop

  • Thread starter Thread starter Kevin Frey
  • Start date Start date
K

Kevin Frey

We have an ActiveX control that we added as a reference to a *Console* C#
testbed. The testbed functions, except that:

a. On VS 2003, performance is fine, but on VS 2005, performance is reduced
approximately 50-fold.
b. There is a huge memory leak.

When the "essence" of application is changed from a console application to a
GUI application, both of the above problems disappear. There is no memory
leak, and no performance problem on VS 2005.

The ActiveX control is Apartment threaded I believe. The C# console
application was marked [STAThread] against main.

Does anyone know what might be causing this difference in behaviour?
 
Ignore this question. Turns out the initialisation of our ActiveX component
was slightly different between some flavors of our testbed, which translated
into differing behaviour. There is still a bug in our ActiveX leading to the
memory leak, but it only presents itself if the component is inappropriately
initialised, as was found to be the case in our situation..
 
Back
Top