title: Javascript object destroy event handler
body: <pre><code>MyMapStaticObject
  
  var PlaceViewModel = function(){
      MyMapStaticObject.addLayer(someLayer);
  }
  
  PlaceViewModel.prototype.addMarker = function(item){
  
  }
  </code></pre>
  
  <p>I have a <em>PlaceViewModel</em> that has a function named <code>addMarker</code>  to add marker to map. I will use <em>PlaceViewModel</em> new istances in different classes.</p>
  
  <pre><code>var inst = new PlaceViewModel();
  </code></pre>
  
  <p>When I initialize the PlaceViewModel, I am adding new layer to map via <em>MyMapStaticObject</em>. I should remove layer when instance destroyed. </p>
  
  <p>Can I handle javascript destroy event?</p>