Yes. If you set your ActiveX to a variable, setting that variable to
something else:
var myVar = new ActiveXObject("Msxml2.XMLHTTP");
//more code here
var myVar = null;
It is correct but only for "well automated" internal services like
IXMLHTTPRequest and so. If you are using ActiveX to launch some
application like MS Word or MS Excel then JScript garbage collector
may have not enough privilege to dismiss the process: they are acting
on different levels, JScript GC inside the current thread while say MS
Word is under the kernel "jurisdiction" where JScript GC is not
allowed. As a result you may end up with JScript reference removed but
the application itself running in orphan - from JScript point of view
- state. This is why I would suggest always first use Quit() or Exit()
method of application itself - if it is provided - and only then
nullify the reference.