Skip to content

Commit

Permalink
Removed allocations during dragging, see phetsims/circuit-constructio…
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Jul 7, 2017
1 parent 8c8c82c commit a925c43
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions js/phetAllocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@ define( function( require ) {

var phetCore = require( 'PHET_CORE/phetCore' );

window.phetAllocationRecord = function() {

console.log( 'ready, set...' );

// start after 2 sec
setTimeout( function() {
console.log( 'go!' );
window.alloc = {};

setTimeout( function() {
window.recordedAllocations = window.alloc;
delete window.alloc;
console.log( 'after ' + window.recordedAllocations.loop.count + ' loops: window.recordedAllocations = ' );
console.log( window.recordedAllocations );
}, 1000 );
}, 2000 );
};

function phetAllocation( name ) {
if ( window.alloc ) {
var stack;
Expand Down

0 comments on commit a925c43

Please sign in to comment.