/*
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 { Base, markType } from "igniteui-angular-core";
/**
 * @hidden
 */
export class ObjectPool$1 extends Base {
    constructor($t, a) {
        super();
        this.$t = null;
        this.a = new Array(1024);
        this.c = null;
        this.d = 0;
        this.$t = $t;
        this.$type = this.$type.specialize(this.$t);
        this.c = a;
    }
    b() {
        if (this.d == 0) {
            return this.c();
        }
        return this.a[--this.d];
    }
    f(a) {
        if (this.d == 1024) {
            return;
        }
        this.a[this.d++] = a;
    }
}
ObjectPool$1.$t = markType(ObjectPool$1, 'ObjectPool$1');
//# sourceMappingURL=ObjectPool$1.js.map