MCPcopy Index your code
hub / github.com/codecombat/codecombat / destroy

Method destroy

app/views/play/SpectateView.js:463–488  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

461 }
462
463 destroy () {
464 if (this.levelLoader != null) {
465 this.levelLoader.destroy()
466 }
467 if (this.surface != null) {
468 this.surface.destroy()
469 }
470 if (this.god != null) {
471 this.god.destroy()
472 }
473 if (this.goalManager != null) {
474 this.goalManager.destroy()
475 }
476 if (this.scriptManager != null) {
477 this.scriptManager.destroy()
478 }
479 delete window.world // not sure where this is set, but this is one way to clean it up
480 const object = this.editors != null ? this.editors : {}
481 for (const team in object) { const editor = object[team]; this.destroyAceEditor(editor) }
482 if (PROFILE_ME) {
483 if (typeof console.profileEnd === 'function') {
484 console.profileEnd()
485 }
486 }
487 return super.destroy()
488 }
489 }
490 SpectateLevelView.initClass()
491 return SpectateLevelView

Callers 1

grabLevelLoaderDataMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected