Permalink
Browse files

clear DraweeControllerBuilder after usage

Reviewed By: achen1

Differential Revision: D4908279

fbshipit-source-id: 8de9930a2160f3201f8b7a8a66415310fa2f41de
  • Loading branch information...
AaaChiuuu authored and facebook-github-bot committed Apr 19, 2017
1 parent 8f2d73d commit 3fda6a9a2b380a750b72d369f5fb4f11540ad1ef
@@ -449,6 +449,10 @@ public void maybeUpdateView() {
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 void draw(
.setImageRequest(imageRequest)
.build();
mDraweeHolder.setController(draweeController);
mDraweeControllerBuilder.reset();
mDrawable = mDraweeHolder.getTopLevelDrawable();
mDrawable.setBounds(0, 0, mWidth, mHeight);

0 comments on commit 3fda6a9

Please sign in to comment.