// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.11/esri/copyright.txt for details.
//>>built
define(["require","exports","./tsSupport/extendsHelper","./ObjectPool"],function(d,e,f,g){Object.defineProperty(e,"__esModule",{value:!0});d=function(c){function b(){var a=null!==c&&c.apply(this,arguments)||this;a._set=new Set;return a}f(b,c);b.prototype.destroy=function(){c.prototype.destroy.call(this);this._set=null};b.prototype.acquire=function(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];a=c.prototype.acquire.apply(this,a);this._set.delete(a);return a};b.prototype.release=function(a){a&&
!this._set.has(a)&&(c.prototype.release.call(this,a),this._set.add(a))};b.prototype._dispose=function(a){this._set.delete(a);c.prototype._dispose.call(this,a)};return b}(g);e.ReentrantObjectPool=d});