@amcharts/amcharts5
Version:
amCharts 5
23 lines • 474 B
JavaScript
/**
* @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