/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import * as tslib_1 from "tslib";
import { Base, markType } from "igniteui-angular-core";
/**
 * @hidden
 */
var ObjectPool$2 = /** @class */ (function (_super) {
    tslib_1.__extends(ObjectPool$2, _super);
    function ObjectPool$2($t, $tArg, a, b) {
        var _this = _super.call(this) || this;
        _this.$t = null;
        _this.$tArg = null;
        _this.a = new Array(1024);
        _this.d = null;
        _this.c = null;
        _this.e = 0;
        _this.$t = $t;
        _this.$tArg = $tArg;
        _this.$type = _this.$type.specialize(_this.$t, _this.$tArg);
        _this.d = a;
        _this.c = b;
        return _this;
    }
    ObjectPool$2.prototype.b = function (a) {
        if (this.e == 0) {
            return this.d(a);
        }
        var b = this.a[--this.e];
        this.c(b, a);
        return b;
    };
    ObjectPool$2.prototype.g = function (a) {
        if (this.e == 1024) {
            return;
        }
        this.a[this.e++] = a;
    };
    ObjectPool$2.$t = markType(ObjectPool$2, 'ObjectPool$2');
    return ObjectPool$2;
}(Base));
export { ObjectPool$2 };
//# sourceMappingURL=ObjectPool$2.js.map