aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFicus Kirkpatrick <ficus@android.com>2014-09-03 12:02:51 -0700
committerFicus Kirkpatrick <ficus@android.com>2014-09-03 12:02:51 -0700
commitf4c18d49913ddf4d43ad546e2b8c5f3d6ec7c88e (patch)
tree1e118b6641e9496fa6d78d5de8ad075754793530 /src
parentef2ac654aec476e6d377166f3ff77701bf325dc7 (diff)
downloadvolley-f4c18d49913ddf4d43ad546e2b8c5f3d6ec7c88e.tar.gz
Don't hold onto requests indefinitely.
Move the request into NetworkDispatcher's loop so that the previously processed request's reference is not held until the next request comes off the queue.
Diffstat (limited to 'src')
-rw-r--r--src/com/android/volley/NetworkDispatcher.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/volley/NetworkDispatcher.java b/src/com/android/volley/NetworkDispatcher.java
index a654ead..9c1c2e3 100644
--- a/src/com/android/volley/NetworkDispatcher.java
+++ b/src/com/android/volley/NetworkDispatcher.java
@@ -81,8 +81,8 @@ public class NetworkDispatcher extends Thread {
@Override
public void run() {
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
- Request<?> request;
while (true) {
+ Request<?> request;
try {
// Take a request from the queue.
request = mQueue.take();