ActiveX object not destroyed under Internet Explorer

Last reviewed: 7/7/2007

PRB Article ID: P070702

The information in this article applies to:

  • SpeechKit 5

Symptoms

Instantiate the ActiveX or Web component classes as ActiveX objects using ActiveXObject declaration in Javascript do not appear to terminate when the object is deleted.

Cause

Javascript object delete method does not destroy the ActiveX object. For example:

var WChantTTS1 = new ActiveXObject(WSpeechKitLib.WChantTTS);
...
WChantTTS1.StartPlayback("Hello World");
...
delete WChantTTS1;

Status

Using ActiveXObject is an alternative approach to declaring the object in an <OBJECT> tag. The new method Dispose has been added to allow the application to destroy the object as follows:

var WChantTTS1 = new ActiveXObject(WSpeechKitLib.WChantTTS);
...
WChantTTS1.StartPlayback("Hello World");
...
WChantTTS1.Dispose();
WChantTTS1 = null;

Fixed in SpeechKit 5 build 5.0.10.0 (Win32).

Component Formats Impacted

ActiveX and Web components.