title: How can I unset an (unsigned) integer in ActionScript/Flex 3?
body: <p>I have a class which is called a number of times. When the application goes to the next stage these all have to be unloaded. Because of that, I created an unload() method in the class.</p>
  
  <p>The problem is that I can't seem to set my uint variable "charId" to null in order to "unset" it. The "delete" command is not possible either as that is only applicable for dynamic variables or something in that kind of way.</p>
  
  <p>Now I wonder, how am I supposed to unset this variable, so it's memory will be re-allocated later on?</p>
  
  <p>The class's unload method:</p>
  
  <pre><code>public function unload():void
          {
              trace("Unloading character with charname '" + charName + "'.");
              enterButton.removeEventListener(MouseEvent.CLICK, enterClicked);
              removeChild(enterButton);
              enterButton = null;
              charName = null;
              charId = null; //this is possible but not recommended - what's a better way?
              lobbyInterface = null;
          }
  </code></pre>
  
  <p>So yeah, it's practically possible as it changes the variable type - however it's not recommended and raising a warning. So, what's a better way to do it?</p>
  
  <p>Note that this object is also unloaded in it's parent. Does that also free all these variables from memory?</p>