title: javascript event handler after removing node
body: <p>if i add event handler on any element in javascript like</p>
  
  <pre><code>var link = document.createElement("a");
  
  document.body.appendChild(link);
  
  
  link.addEventListner("click",function(){
  
       alert("do something");
  
  });
  </code></pre>
  
  <p>and then i remove the link</p>
  
  <pre><code>link.parrentNode.removeChild(link);
  </code></pre>
  
  <p>then what about event that i attached to link will it also be removed or will it remain in memory (a bit confused with how event are stored in memory and for how long) or should i first remove the the event handler and then i remove the link node. </p>