Skip to content

Commit

Permalink
Doc fix and memory leak fix, see #203
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Sep 15, 2020
1 parent bd3532a commit b74af3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion js/common/model/BunnyCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class BunnyCollection {
tandem: options.tandem.createTandem( 'deadBunnies' )
} );

// @private {Bunny[]} Recessive mutants, to be mated eagerly so that their mutation appears in the phenotype as
// @private {BunnyArray} Recessive mutants, to be mated eagerly so that their mutation appears in the phenotype as
// soon as possible. Mutants are added to this array when born, and removed as soon as they have mated with
// another bunny that has the same mutant allele. See also the 'Recessive Mutants' section of model.md at
// https://github.com/phetsims/natural-selection/blob/master/doc/model.md#recessive-mutants.
Expand Down
3 changes: 3 additions & 0 deletions js/common/view/pedigree/PedigreeBunnyNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ class PedigreeBunnyNode extends Node {
if ( bunny.diedEmitter.hasListener( addRedCrossMark ) ) {
bunny.diedEmitter.removeListener( addRedCrossMark );
}

// Un-parent the bunnyNode from the shared DAG
bunnyNode.dispose();
};

// If logging is enabled, pressing on a bunny logs its details to the console.
Expand Down

0 comments on commit b74af3f

Please sign in to comment.