title: [Javascript]: Does Elements created using CreateElement method, cause memory leak, if not removed properly?
body: <p>I create elements using createElement method, and append it to some parent element. Later on,  I clear the innerHTML of the parent element. Will this cause memory leak ? what happens to the element that was created ? If this is a memory leak, how to handle it?. also, if there is any callback function attached to the element, does it need to be detached ?</p>
  
  <pre><code>var spanelem = document.createElement('span');
  spanelem.onclick = function(){
  CallMe();
  };
  var parentdiv = document.getElementById('ParentCnt');
  parentdiv.appendChild(spanelem);
  .....
  
  .....
  parentdiv.innerHTML = " "; //is this memory Leak ? what happens to spanelem?
  </code></pre>