UNPKG

@amcharts/amcharts5

Version:
23 lines 474 B
/** * @ignore */ export class CounterRef { constructor(f) { this._refs = 0; this._disposed = false; this._dispose = f; } incrementRef() { ++this._refs; } decrementRef() { --this._refs; if (this._refs <= 0) { if (!this._disposed) { this._disposed = true; this._dispose(); } } } } //# sourceMappingURL=Counter.js.map