I'm making a volley request in this way:
   public void makeRequest(BaseRequest request, Response.Listener<JSONObject> responseListener,
                            Response.ErrorListener errorListener) {
        if (Constants.DEBUG) Log.i(TAG, "Sending: " + request.getUrlRequest());
        JsonObjectRequest jsObjRequest = new JsonObjectRequest(METHOD, request.getUrlRequest(), null, responseListener, errorListener);
        // disable cache
        jsObjRequest.setShouldCache(false);
        jsObjRequest.setTag(mTag);
        mQueue.add(jsObjRequest);
    }
mTag is a Class type. I have an activity where on its onCreate method I call the volley request with this:
mVolleyManager.makeRequest(getRequest(), new Response.Listener<JSONObject>() {
        @Override
        public void onResponse(JSONObject response) {
            refreshLayout.setRefreshing(false);
            onEndLoading(response);
        }
    }, new Response.ErrorListener() {
        @Override
        public void onErrorResponse(VolleyError error) {
            refreshLayout.setRefreshing(false);
            onErrorLoading(error);
        }
    });
If I start open and closing the activity for a bunch of time, my memory keeps growing till it reaches an OOM error. I tried to have a look with MAT and here's the result:


It seems that Volley keeps in memory all of its requests, even if the onResponse method is correctly called. I already solved the problem by switching to Retrofit. Same code, same requests and it's working but I want to understand what could be the cause of my problem.