0 Replies Latest reply on Jul 9, 2007 8:59 AM by levancho

    instance stays in memory foreve and keeps executing.

    levancho Level 3
      I have a timer component from Flex Box and I have a userLogin even listener ,
      inside that listener I have following code :

      var npdTimeOut:ClientIdleTimeOut = null;
      private function userLoginEventHandler(event:SecurityEvent): void {


      npdTimeOut = new ClientIdleTimeOut();
      npdTimeOut.listenKeyStroke=true;
      npdTimeOut.timeOutInterval= securityManager.timeOut;
      npdTimeOut.confirmInterval=(securityManager.timeOut-1);
      npdTimeOut.onTimeOut = this.appTimedOutHandler;


      and in Logout event handler I set this object to null:

      npdTimeOut = null;

      but it does not work, instance stays in memory and worst of all every time user logs into the system new instance gets crated so instead of one timeout warning window I get two, three, four ,etc alerts,
      why does not setting object reference to null destroys the object is that how flex VM works?