Skip to content

Commit

Permalink
fix memory leak, #78
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Apr 24, 2017
1 parent 81bc1bb commit 4eb4663
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/linegame/view/ChallengeNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ define( function( require ) {
model.playStateProperty.set( PlayState.SECOND_CHECK );
}
};
model.challengeProperty.get().guessProperty.link( guessObserver ); // unlink in dispose
challenge.guessProperty.link( guessObserver ); // unlink in dispose

// @private called by dispose
this.disposeChallengeNode = function() {
pointToolNode1.dispose();
pointToolNode2.dispose();
model.playStateProperty.unlink( playStateObserver );
model.challengeProperty.get().guessProperty.unlink( guessObserver );
challenge.guessProperty.unlink( guessObserver );
};
}

Expand Down

0 comments on commit 4eb4663

Please sign in to comment.