po*******@softhome.net wrote:
I mean the same purpose, release system and free memory resources
after code finished:
var WSHShell;
WSHShell = new ActiveXObject("WScript.Shell");
WshShell = null;
is this correct?
It's correct, yes. But it doesn't do exactly what you're asking.
Read up on Garbage Collection as a programming concept. The whole point is,
you don't get to control when memory and resources are freed. The language
implementation does that for you. You don't need to care. The above code
makes the object _available_ for cleanup, which is all you need to do.
IE has proprietary methods to explicitly call the garbage collector, but you
still can't guarantee that your resources will be freed when you want them
to be.
--
Matt Kruse
http://www.JavascriptToolbox.com http://www.AjaxToolbox.com