mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-11-30 03:08:12 +08:00
fux imageview's double free (for file loading)
This commit is contained in:
parent
210d02acfd
commit
9ab092a0df
@ -10,12 +10,12 @@ BitmapDrawable::BitmapState::BitmapState(){
|
||||
mBaseAlpha= 1.0f;
|
||||
mAlpha = 255;
|
||||
mTint = nullptr;
|
||||
mTransparency= -1;
|
||||
mTintMode = DEFAULT_TINT_MODE;
|
||||
mTileModeX =mTileModeY=-1;
|
||||
mAutoMirrored= false;
|
||||
mSrcDensityOverride=0;
|
||||
mTargetDensity=160;
|
||||
mTransparency = -1;
|
||||
mTintMode = DEFAULT_TINT_MODE;
|
||||
mTileModeX = mTileModeY = -1;
|
||||
mAutoMirrored = false;
|
||||
mSrcDensityOverride = 0;
|
||||
mTargetDensity = 160;
|
||||
mChangingConfigurations=0;
|
||||
}
|
||||
|
||||
|
@ -42,13 +42,14 @@ void ImageView::initImageView(){
|
||||
mViewAlphaScale= 256;
|
||||
mDrawableWidth = mDrawableHeight = -1;
|
||||
mScaleType = FIT_CENTER;
|
||||
mHaveFrame = true;
|
||||
mMergeState = false;
|
||||
mCropToPadding= false;
|
||||
mDrawable = nullptr;
|
||||
mHaveFrame = true;
|
||||
mDrawMatrix= identity_matrix();
|
||||
mCropToPadding = false;
|
||||
mAdjustViewBounds = false;
|
||||
mDrawable = nullptr;
|
||||
mDrawMatrix = identity_matrix();
|
||||
mMatrix = identity_matrix();
|
||||
mRecycleableBitmapDrawable= nullptr;
|
||||
mRecycleableBitmapDrawable = nullptr;
|
||||
mMaxWidth = mMaxHeight = INT_MAX;
|
||||
mDrawableTintList = nullptr;
|
||||
mColorFilter = nullptr;
|
||||
@ -56,10 +57,11 @@ void ImageView::initImageView(){
|
||||
}
|
||||
|
||||
ImageView::~ImageView() {
|
||||
if(mDrawable!=mRecycleableBitmapDrawable)
|
||||
delete mRecycleableBitmapDrawable;
|
||||
delete mDrawable;
|
||||
delete mDrawableTintList;
|
||||
delete mColorFilter;
|
||||
delete mRecycleableBitmapDrawable;
|
||||
}
|
||||
|
||||
void ImageView::resolveUri(){
|
||||
|
@ -906,6 +906,10 @@ TabLayout::TabView::TabView(Context* context,const AttributeSet&atts,TabLayout*p
|
||||
//ViewCompat.setPointerIcon(this,PointerIconCompat.getSystemIcon(getContext(), PointerIconCompat.TYPE_HAND));
|
||||
}
|
||||
|
||||
TabLayout::TabView::~TabView(){
|
||||
delete mTab;
|
||||
}
|
||||
|
||||
bool TabLayout::TabView::performClick(){
|
||||
bool handled = LinearLayout::performClick();
|
||||
|
||||
|
@ -71,6 +71,7 @@ public:
|
||||
float approximateLineWidth(Layout* layout, int line, float textSize);
|
||||
public:
|
||||
TabView(Context* context,const AttributeSet&atts,TabLayout*parent);
|
||||
~TabView();
|
||||
bool performClick()override;
|
||||
void setSelected(bool selected)override;
|
||||
void onMeasure(int origWidthMeasureSpec,int origHeightMeasureSpec)override;
|
||||
|
@ -624,7 +624,7 @@ void ViewPager::populate(int newCurrentItem){
|
||||
ii = addNewItem(pos, itemIndex);
|
||||
itemIndex++;
|
||||
extraWidthRight += ii->widthFactor;
|
||||
ii = itemIndex < mItems.size() ? mItems.at(itemIndex) : nullptr;
|
||||
ii = itemIndex < mItems.size() ? mItems.at(itemIndex) : nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user