clear DraweeControllerBuilder after usage
Reviewed By: achen1 Differential Revision: D4908279 fbshipit-source-id: 8de9930a2160f3201f8b7a8a66415310fa2f41de
This commit is contained in:
parent
8f2d73d50b
commit
3fda6a9a2b
|
@ -449,6 +449,10 @@ public class ReactImageView extends GenericDraweeView {
|
|||
|
||||
setController(mDraweeControllerBuilder.build());
|
||||
mIsDirty = false;
|
||||
|
||||
// Reset again so the DraweeControllerBuilder clears all it's references. Otherwise, this causes
|
||||
// a memory leak.
|
||||
mDraweeControllerBuilder.reset();
|
||||
}
|
||||
|
||||
// VisibleForTesting
|
||||
|
|
|
@ -141,6 +141,7 @@ public class FrescoBasedReactTextInlineImageSpan extends TextInlineImageSpan {
|
|||
.setImageRequest(imageRequest)
|
||||
.build();
|
||||
mDraweeHolder.setController(draweeController);
|
||||
mDraweeControllerBuilder.reset();
|
||||
|
||||
mDrawable = mDraweeHolder.getTopLevelDrawable();
|
||||
mDrawable.setBounds(0, 0, mWidth, mHeight);
|
||||
|
|
Loading…
Reference in New Issue