[JAVA-544] com.mongodb.gridfs.GridFSDBFile.writeTo( File ) does not close handle Created: 25/Mar/12  Updated: 18/Jun/12  Resolved: 27/Apr/12

Status: Closed
Project: Java Driver
Component/s: GridFS
Affects Version/s: 2.7.3
Fix Version/s: 2.8.0

Type: Bug Priority: Major - P3
Reporter: Alan Williamson Assignee: Bryan Reinero
Resolution: Done Votes: 0
Labels: driver, gridfs, java
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When using the Java API to pull out a file from the GridFS the writeTo( File ) works, however the file handle is not closed down properly. You have to wait until the underlying JVM cleans it up, or exits. Major memory leak issue.

Work around: use writeTo( OutputStream ) and manage the stream yourself



 Comments   
Comment by Jeffrey Yemin [ 18/Jun/12 ]

Closing for 2.8.0 release.

Comment by Bryan Reinero [ 27/Apr/12 ]

github commit:
https://github.com/mongodb/mongo-java-driver/commit/e19ec503166ee6af2e38350d142ebfd8f73c6bac

Comment by Jeffrey Yemin [ 26/Mar/12 ]

Since there is a workaround, setting priority to major.

Generated at Thu Feb 08 08:52:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.