code: function cleanupProxyOnDestroy (object) {
        if (api.mediaCapturer && api.mediaCapturer.id === object.id) {
          api.mediaCapturer = null;
        }
        else if (proxies.hasOwnProperty(object.id)) {
          delete proxies[object.id];
        }
  
        if (object.$) {
          object.$.remove();
        }
      }
docs: / Private API This is called whenever a Proxy's destroy event fires.