code: function destroyInstance (instanceId) {
    var instance = instanceOptions[instanceId];
    if (instance && instance.app instanceof instance.Vue) {
      try {
        instance.app.$destroy();
        instance.document.destroy();
      } catch (e) {}
      delete instance.document;
      delete instance.app;
    }
    delete instanceOptions[instanceId];
  }
docs: Destroy an instance with id. It will make sure all memory of
  this instance released and no more leaks.