|
@@ -121,6 +121,14 @@ export default class Document {
|
|
|
this._postFixers.add( postFixer );
|
|
this._postFixers.add( postFixer );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Destroys this instance. Makes sure that all observers are destroyed and listeners removed.
|
|
|
|
|
+ */
|
|
|
|
|
+ destroy() {
|
|
|
|
|
+ this.roots.map( root => root.destroy() );
|
|
|
|
|
+ this.stopListening();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Performs post-fixer loops. Executes post-fixer callbacks as long as none of them has done any changes to the model.
|
|
* Performs post-fixer loops. Executes post-fixer callbacks as long as none of them has done any changes to the model.
|
|
|
*
|
|
*
|