in JavaScript, when finished with an object created via new ActiveXObject, do I need to set it to null?
问题 In a Javascript program that runs within WSH and creates objects, let's say Scripting.FileSystemObject or any arbitrary COM object, do I need to set the variable to null when I'm finished with it? Eg, am I recommended to do this: var fso = new ActiveXObject("Scripting.FileSystemObject"); var fileStream = fso.openTextFile(filename); fso = null; // recommended? necessary? ... use fileStream here ... fileStream.Close(); fileStream = null; // recommended? necessary? Is the effect different than