bumptech/glide — pull request #61 by vickychijwani (2014-02-15 22:38:37+00:00)
Title: Fix unclosed OutputStream in DiskLruCacheWrapper (reported by StrictMode...

Hi there,

I've been using Glide in my project, and it sure is great to have the best of Picasso and the best of Volley. Thank you for this.

Recently I've turned on StrictMode in my app, and I frequently get the following message in LogCat:

```java
E/StrictMode﹕ A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:184)
at java.io.FileOutputStream.(FileOutputStream.java:90)
at java.io.FileOutputStream.(FileOutputStream.java:73)
at com.jakewharton.disklrucache.DiskLruCache$Editor.newOutputStream(DiskLruCache.java:779)
at com.bumptech.glide.resize.cache.DiskLruCacheWrapper.put(DiskLruCacheWrapper.java:80)
at com.bumptech.glide.resize.ImageManager.putInDiskCache(ImageManager.java:525)
at com.bumptech.glide.resize.ImageManager.access$2400(ImageManager.java:57)
at com.bumptech.glide.resize.ImageManager$ImageManagerRunner.finishResize(ImageManager.java:665)
at com.bumptech.glide.resize.ImageManager$ImageManagerRunner.access$2000(ImageManager.java:549)
at com.bumptech.glide.resize.ImageManager$ImageManagerRunner$1$1$1.run(ImageManager.java:641)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
```

This pull request corrects the issue by closing the `OutputStream` when it is no longer needed.