* @function LevelRenderer.Render.prototype.dispose * @description 释放当前 Render 实例(删除包括 dom,数据、显示和事件绑定),dispose后 Render 不可用。
()
| 475 | * @description 释放当前 Render 实例(删除包括 dom,数据、显示和事件绑定),dispose后 Render 不可用。 |
| 476 | */ |
| 477 | dispose() { |
| 478 | this.animation.stop(); |
| 479 | |
| 480 | this.clear(); |
| 481 | this.storage.dispose(); |
| 482 | this.painter.dispose(); |
| 483 | this.handler.dispose(); |
| 484 | |
| 485 | this.animation = null; |
| 486 | this.animatingElements = null; |
| 487 | this.storage = null; |
| 488 | this.painter = null; |
| 489 | this.handler = null; |
| 490 | |
| 491 | // 释放后告诉全局删除对自己的索引,没想到啥好方法 |
| 492 | // zrender.delInstance(this.id); |
| 493 | |
| 494 | } |
| 495 | |
| 496 | // SMIC-方法扩展 - start |
| 497 | /** |
no test coverage detected