diff --git a/library/src/main/java/com/bumptech/glide/RequestManager.java b/library/src/main/java/com/bumptech/glide/RequestManager.java index 0a205d266f..a33e2b9ec4 100644 --- a/library/src/main/java/com/bumptech/glide/RequestManager.java +++ b/library/src/main/java/com/bumptech/glide/RequestManager.java @@ -590,7 +590,7 @@ public void clear(@NonNull View view) { * * @param target The Target to cancel loads for. */ - public synchronized void clear(@Nullable final Target target) { + public void clear(@Nullable final Target target) { if (target == null) { return; } @@ -617,8 +617,8 @@ private void untrackOrDelegate(@NonNull Target target) { // the corresponding Activity or Fragment is destroyed because retaining any reference to the // RequestManager leaks memory. It's possible that there's some brief period of time during or // immediately after onDestroy where this is reasonable, but I can't think of why. - if (!isOwnedByUs && !glide.removeFromManagers(target) && target.getRequest() != null) { - Request request = target.getRequest(); + Request request = target.getRequest(); + if (!isOwnedByUs && !glide.removeFromManagers(target) && request != null) { target.setRequest(null); request.clear(); }