Thursday, June 3, 2010

surprised deleteOnExit() method on java.io.File

The commons-fileupload jar (commons-fileupload-1.0.jar) got a problem of leaking memory on usage of certain functions (shown below)

parseRequest(HttpServletRequest req) method of class org.apache.commons.fileupload.FileUploadBase
includes call to getOutputStream() and subsequently to getTempFile() of class org.apache.commons.fileupload.DefaultFileItem. This in turn calls deleteOnExit on java.io.File which is reported to have memory leaks.

This deleteOnExit() will cause memory leaks in your application. This issue was resolved using the latest jar file commons-fileupload-1.2.1.

No comments:

Post a Comment