public void clearViewsList() { if (mViews == null || mViews.size() == 0) { return; } synchronized (viewsLock) { mPager.removeAllViews(); for (TiViewProxy viewProxy : mViews) { viewProxy.releaseViews(true); } mViews.clear(); } }
@Override public void release() { if (mPager != null) { mPager.removeAllViews(); // for (int i = mPager.getChildCount() - 1; i >= 0; i--) { // mPager.removeViewAt(i); // } } if (mViews != null) { for (TiViewProxy viewProxy : mViews) { viewProxy.releaseViews(true); } mViews.clear(); } super.release(); }