I have fragment while changing orientation of fragment I got OOM.
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
if (mLogEnabled)
Log.i(LOG_TAG, "OnSizeChanged()");
if (w > 0 && h > 0 && w < 10000 && h < 10000) {
// create a new bitmap with the new dimensions
mDrawBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_4444); // Error Here
// mDrawCanvas = new Canvas(mDrawBitmap);
mViewPortHandler.setChartDimens(w, h);
if (mLogEnabled)
Log.i(LOG_TAG, "Setting chart dimens, width: " + w + ", height: " + h);
}
notifyDataSetChanged();
super.onSizeChanged(w, h, oldw, oldh);
}
I have already retain the fragment but still it caused memory leaked. Thanks
I have fragment while changing orientation of fragment I got OOM.
I have already retain the fragment but still it caused memory leaked. Thanks