/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{MemCachePool as e}from"../../../core/MemCachePool.js";import{layout as r}from"./TerrainAttributes.js";class t{constructor(r){this._storage=new e((e,t)=>r.newCache(e,t),"TileGeometry")}acquire(e){const t=4,s=Math.ceil(e/t)*t,a=this._storage,c=o(s),i=a.pop(c);if(i)return i;const n=r.createBuffer(s);return n.release=()=>a.put(c,n),n}clear(){this._storage.clear()}destroy(){this._storage.destroy()}}function o(e){return e.toString()}export{t as TerrainAttributesCache};
