function clean(scope) {
  var computables = build_computable_list(scope);

  function drop_if_unused(item) {
    if (!is_used(scope, item)) {
      item.destroy();
    }
  }

  var initial_count = scope.get_computable_count();
  for (var i = computables.length - 1; i >= 0; i--) {
    drop_if_unused(computables[i]);
  }

  var dropped = initial_count - scope.get_computable_count();
  return dropped;
}
/**
 * @param {Scope} scope
 * @returns {number} The number of computables dropped from cleaning this scope
 *
 * Destroys any unused computables contained in the input scope
 */
@param {Scope} scope
@returns {number} The number of computables dropped from cleaning this scope

Destroys any unused computables contained in the input scope
@param { Scope } scope @returns { number } The number of computables dropped from cleaning this scope Destroys any unused computables contained in the input scope
function clean(scope) {
  var computables = build_computable_list(scope);
  function drop_if_unused(item) {
    if (!is_used(scope, item)) {
      item.destroy();
    }
  }
  var initial_count = scope.get_computable_count();
  for (var i = computables.length - 1; i >= 0; i--) {
    drop_if_unused(computables[i]);
  }
  var dropped = initial_count - scope.get_computable_count();
  return dropped;
}
function clean ( scope ) { var computables = build_computable_list ( scope ) ; function drop_if_unused ( item ) { if ( ! is_used ( scope , item ) ) { item . destroy ( ) ; } } var initial_count = scope . get_computable_count ( ) ; for ( var i = computables . length - 1 ; i >= 0 ; i -- ) { drop_if_unused ( computables [ i ] ) ; } var dropped = initial_count - scope . get_computable_count ( ) ; return dropped ; }
@param {Scope} scope
 @returns {number} The number of computables dropped from cleaning this scope
@param { Scope } scope @returns { number } The number of computables dropped from cleaning this scope