Skip to content

Commit

Permalink
Factor out to reduce memory footprint, see phetsims/tandem#71
Browse files Browse the repository at this point in the history
(cherry picked from commit 036865d)
  • Loading branch information
samreid authored and jbphet committed Nov 20, 2018
1 parent 3441ae4 commit de77d4b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/ObservableArray.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ define( function( require ) {
var PhetioObject = require( 'TANDEM/PhetioObject' );
var Tandem = require( 'TANDEM/Tandem' );

// Factor out to reduce memory footprint, see https://github.com/phetsims/tandem/issues/71
var ObservableArrayIOType = ObservableArrayIO( ObjectIO );

/**
* @param {Object[]} [array]
* @param {Object} [options]
Expand All @@ -36,7 +39,7 @@ define( function( require ) {

options = _.extend( {
allowDuplicates: false, // are duplicate items allowed in the array?
phetioType: ObservableArrayIO( ObjectIO ),
phetioType: ObservableArrayIOType,
tandem: Tandem.optional
}, options );

Expand Down

0 comments on commit de77d4b

Please sign in to comment.