equal
deleted
inserted
replaced
280 /** |
280 /** |
281 * Releases a temporary buffer by returning to the cache or freeing it. If |
281 * Releases a temporary buffer by returning to the cache or freeing it. If |
282 * returning to the cache then insert it at the start so that it is |
282 * returning to the cache then insert it at the start so that it is |
283 * likely to be returned by a subsequent call to getTemporaryDirectBuffer. |
283 * likely to be returned by a subsequent call to getTemporaryDirectBuffer. |
284 */ |
284 */ |
285 public static void offerFirstTemporaryDirectBuffer(ByteBuffer buf) { |
285 static void offerFirstTemporaryDirectBuffer(ByteBuffer buf) { |
286 // If the buffer is too large for the cache we don't have to |
286 // If the buffer is too large for the cache we don't have to |
287 // check the cache. We'll just free it. |
287 // check the cache. We'll just free it. |
288 if (isBufferTooLarge(buf)) { |
288 if (isBufferTooLarge(buf)) { |
289 free(buf); |
289 free(buf); |
290 return; |
290 return; |