views:

28

answers:

1

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?