android - Volley memory leak on HEAD requests -
 Regarding the   All head requests, my device will run out of memory quickly. Why it seems that it allocates memory based on   new poolingbatteryreutputstream (mPool, (entity) entity.getContentLength ());     What am I doing:    Is anyone experiencing the same problem? Is this a bug or just my mistake? Thanks in advance.       I have managed to fix it myself, this is a library bug if someone has the same If there is a problem, you will need to add the following additional IF statements to line    By doing this, the volley no longer allocates more content-length memory, thanks to anyway if anyone has tried not to give me any results.    volley library  for Android:   volumes  content in HEAD requests, for example in line 212   
 
 requestkey mRequestQueue = Volley.newRequestQueue (this); For (link: different_links_of_mp3_files) {StringRequest req = New StringRequest (Method.HEAD, URL, blank); MRequestQueue.add (req)    
 // if the request method is prominent, then there is no need to assign / memory if (request .getMethod () == Request method.HEAD) {responseContents = new byte [0]; } // Some responses such as 204s do not have content, we must check // and if (httpResponse.getEntity ()! = Null) {responsiveContents = entityToBytes (httpResponse.getEntity ()); } else {0} Add 0 byte feedback as a way to represent the honest request of e-content request feedback = new byte [0]; }   
 
Comments
Post a Comment