I’m calling a C# COM component using javascript: keystore = new ActiveXObject("RBCrypto.KeyStore");. I’ve noticed this instance stays around until I exit the browser. Is there anyway to “release” that object when the user leaves the page? Currently i’m using:
window.onunload=function() //when a user leaves the page close the keystore
{
if(keystore != null)
{
try
{
keystore.closeKeyStore(); //method in keystore
delete keystore;
}
catch(err) { alert(err.description); }
}
}
But the COM object is still hangin around. Any ideas?
I know it’s a little late to respond. “Before late than never”
I think the correct is “Application.Quit();”. However, the Application of object COM/OLE/ActiveX can return null. I do not know how to do return Application != null to run the Quit();
You can try…