Пример #1
0
 public void push(float[] rect) {
   if (mRects.size() >= mCapity) {
     RectPoolableCache rc = mRects.removeFirst();
     mRectsCachePool.release(rc);
   }
   RectPoolableCache rc = mRectsCachePool.acquire();
   if (rc != null) {
     rc.setRect(rect);
     mRects.add(rc);
   }
 }
 private void clearCachePool() {
   DrawingCache item;
   while ((item = mCachePool.acquire()) != null) {
     item.destroy();
   }
 }