DevTools/Actor Best Practices: Difference between revisions

Jump to navigation Jump to search
Line 14: Line 14:
   },</nowiki>
   },</nowiki>


Also, ensure that the actor's <code>destroy</code> is really destroying everything that it should.
Also, ensure that the actor's <code>destroy</code> is really destroying everything that it should. Here's an example from the animation actor:
 
<nowiki>
  destroy: function() {
    Actor.prototype.destroy.call(this);
    events.off(this.tabActor, "will-navigate", this.onWillNavigate);
    events.off(this.tabActor, "navigate", this.onNavigate);
 
    this.stopAnimationPlayerUpdates();
    this.tabActor = this.observer = this.actors = null;
  },</nowiki>


With <code>protocol.js</code> actors, if your creates child actors for further functionality, in most cases you should call:
With <code>protocol.js</code> actors, if your creates child actors for further functionality, in most cases you should call:
Confirmed users
177

edits

Navigation menu